       .TITLE .DC    POLYNOMIAL EVALUATOR (C1X+C3X3+C5X5+....CNXN)
/ 
/ 
/                   FIRST PRINTING, FEBRUARY 1974
/ 
/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO 
/ CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED
/ AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPON-
/ SIBILITY FOR ANY ERRORS THAT MAY APPEAR IN THIS
/ DOCUMENT.
/ 
/ THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FUR-
/ NISHED TO THE PURCHASER UNDER A LICENSE FOR USE ON
/ A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH
/ INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR 
/ USE IN SUCH SYSTEM, EXCEPT AS MAY OTHERWISE BE PRO-
/ VIDED IN WRITING BY DIGITAL.
/ 
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
/ FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIP-
/ MENT THAT IS NOT SUPPLIED BY DIGITAL.
/ 
/ COPYRIGHT (C) 1974, BY DIGITAL EQUIPMENT CORPORATION
/ 
/ 
        .EJECT
/COPYRIGHT 1970,1971, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/EDIT 1  1-25-71
/FOR HARDWARE FLOATING POINT PROCESSOR (FPP), DEFINE %FPP,
	.GLOBL .DC,
	.IFUND %FPP
	.GLOBL .AP,.AS,.AO,.AQ
	.ENDC
	.IFUND %FPP
	.DEFIN UNDST%,A		/UNNORMALIZED
	JMS* A			/DOUBLE STORE (.AP)
	.ENDM
	.ENDC
	.IFDEF %FPP
UNDST=713770
	.DEFIN UNDST%
	UNDST
	.ENDM
	.ENDC
	.IFUND %FPP
	.DEFIN DMP%,A
	JMS* A			/DOUBLE MULTIPLY (.AS)
	.ENDM
	.ENDC
	.IFDEF %FPP
DMP=711540
	.DEFIN DMP%
	DMP
	.ENDM
	.ENDC
	.IFUND %FPP
	.DEFIN DLD%,A
	JMS* A			/DOUBLE LOAD (.AO)
	.ENDM
	.ENDC
	.IFDEF %FPP
DLD=713150
	.DEFIN DLD%
	DLD
	.ENDM
	.ENDC
	.IFUND %FPP
	.DEFIN DAD%,A		/DOUBLE ADD (.AQ)
	JMS* A
	.ENDM
	.ENDC
	.IFDEF %FPP
DAD=716140
	.DEFIN DAD%
	DAD
	.ENDM
	.ENDC
/             CALLING SEQUENCE         (DOUBLE PRECISION)
/      JMS*   (.DC)           SUBR CALL (FLOAT ACC HAS X)
/      CAL    ADDR            ADDR OF PARAMETERS
/      NEXT   INSTRUCTION     SUBR RETURN
/             PARAMETERS
/ADDR         -N+1            TWO@S COMP +1 OF NUMBER OF COEFFICIENTS
/      C(N)   (1)             LAST COEFFICIENT (IN DOUBLE FORMAT)
/             (2)
/             (3)
/      C(N-1) (1)             NEXT TO LAST
/             (2)
/             (3)
/        .
/        .
/      C1     (1)            FIRST COEFFICIENT
/             (2)
/             (3)
/
.DC    CAL    0              /ENTRY-EXIT
       LAC*   .DC            /GET PARAM ADDR
       DAC    POLY01         /STORE AS POINTER
       LAC*   POLY01         /PICK UP N
       DAC    POLY02         /STORE AS -N-
       ISZ    POLY01         /BUMP POINTER FOR C(N)
       ISZ    .DC            /BUMP EXIT ADDR
       UNDST%   .AP            /STORE DOUBLE (.AP)
       .DSA   POLY04         / (ARG)
       DMP%   .AS            /MULTIPLY DOUBLE (.AS)
       .DSA   POLY04         / (A9GXA9G=A9G2)
       UNDST%   .AP            /STORE DOUBLE (.AP)
       .DSA   POLY06         / (ARG2)
       DLD%   .AO            /LOAD DOUBLE (.AO)
       .DSA   POLY01+400000  / (C(N))
POLY09 DMP%   .AS            /MULTIPLY DOUBLE (.AS)
       .DSA   POLY06         / (ARG2*C(N))
       ISZ    POLY01         /POINTER=POINTER+3
       ISZ    POLY01
       ISZ    POLY01
       DAD%   .AQ            /ADD DOUBLE (.AQ)
       .DSA   POLY01+400000  /(C(N-1)+(A9G2XC(N)))
       ISZ    POLY02         /N=N+1
       JMP    POLY09         /MORE TERMS-CYCLE AGAIN
       DMP%   .AS            /DONE-MULTIPLY DOUBLE (.AS)
       .DSA   POLY04         / (ARGXARG2)
       JMP*   .DC            /EXIT
POLY01 CAL    0              /POINTER
POLY02 CAL    0              /N
POLY04 CAL    0              /ARG (1)
       CAL    0              /    (2)
       CAL    0              /    (3)
POLY06 CAL    0              /ARG2 (1)
       CAL    0              /     (2)
       CAL    0              /     (3)
       .END
