       .TITLE .EB    COMPUTE SINE OF ARGUMENT IN FLOATING ACCUMULATOR
/ 
/ 
/                   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. 01754
/FOR HARDWARE FLOATING POINT PROCESSOR (FPP), DEFINE 90 FPP,
/EDIT 4   2-17-71
       .GLOBL .EB,.AX,.AW,.EC
	.IFUND %FPP
	.GLOBL .AB,.AK,.AH,.AM
	.ENDC
	.IFUND %FPP
	.DEFIN FMP%,A
	JMS* A			/FLOATING MULTIPLY (.AK)
	.ENDM
	.ENDC
	.IFDEF %FPP
FMP=711440
	.DEFIN FMP%
	FMP
	.ENDM
	.ENDC
	.IFUND %FPP
	.DEFIN FST%,A		/FLOATING STORE (.AH)
	JMS* A
	.ENDM
	.ENDC
	.IFDEF %FPP
FST=713640
	.DEFIN FST%
	FST
	.ENDM
	.ENDC
	.IFUND %FPP
	.DEFIN FRS%,A		/FLOATING REVERSE SUBTRACT
	JMS* A			/(.AM)
	.ENDM
	.ENDC
	.IFDEF %FPP
FRS=711040
	.DEFIN FRS%
	FRS
	.ENDM
	.ENDC
/             CALLING SEQUENCE          (SINGLE PRECISION)
/      JMS*   (.EB)           SUBR CALL (ARG IN FLT ACC)
/      NEXT   INSTRUCTION     SUBR RETURN (RESULT IN FLT ACC)
/FPP INSTR. ASS.
	.IFDEF %FPP
FCM=713273
FAB=713271
BMA=716602
	.ENDC
/
.EB    CAL    0              /ENTRY-EXIT
	.IFDEF %FPP
	LAC (2)		/FOR FAB OR ENG
	BMA
	EB16			/MAKE POS.
	CLA
EB16	TAD (FAB)		/MAKE NEG.
	DAC EB19
	FAB
	0			/UNUSED
	.ENDC
	.IFUND %FPP
       LAC*   .AB            /GET SIGN WORD (.AB)
       AND    EB02           / (400000)
       DAC    EB03           /STORE ANS SIGN
       LAC*   .AB            /GET SIGN WORD (.AB)
       AND    EB04           / (377777)
       DAC*   .AB            /STORE POSITIVE SIGN WORD (.AB)
	.ENDC
       FMP%   .AK            /MULTIPLY REAL (.AK)
       .DSA   EB06           / ( 2/PI * ARG)
       FST%   .AH            /STORE REAL (.AH)
       .DSA   EB08           / (TEMP)
       JMS*   .AX            /FIX FOR INTEGER (.AX)
       DAC    EB10           /STORE INTEGER FOR QUADRANT DETERMINATION
       JMS*   .AW            /FLOAT INTEGER ONLY (.AW)
       FRS%   .AM            /REVERSE SUBTRACT REAL (.AM)
       .DSA   EB08           / FOR FRACTION (F)
       LAC    EB10           /GET INTEGER TO DETERMINE QUAD
       RCR                   /B17 TO LINK
       SNL                   /IF SET, COMPUTE 1-F (QUAD II OR IV)
       JMP    EB13
       FRS%   .AM            /REVERSE SUBTRACT REAL (.AM)
       .DSA   EB14           / (1-F)
EB13   LAC    EB10
       RTR                   /B16 TO LINK
       SNL                   /IF SET, NEGATE ANS SIGN (QUAD III OR IV)
       JMP    EB15
	.IFDEF %FPP
	ISZ EB18
	.ENDC
	.IFUND %FPP
       LAC    EB02           /GET SIGN BIT
       XOR    EB03           /XOR ANS SIGN
       DAC    EB03           /STORE ANS SIGN
	.ENDC
EB15   JMS*   .EC            /POLYNOMIAL EVALUATE (.EC)
       .DSA   EB17           /FWA OF CALL SEQUENCE
	.IFDEF %FPP
EB19	0			/FNG OR FAB
	0			/UNUSED
	LAC EB18		/SET?
	SZA
	FCM			/YES. COMPL.
	NOP			/NO
	DZM EB18
	.ENDC
	.IFUND %FPP
       LAC*   .AB            /GET SIGN WORD OF ANSWER (.AB)
       AND    EB04           /STRIP SIGN
       XOR    EB03           /INSERT ANS SIGN
	SAD EB02	/CHECK FOR -0.0 CASE
	CLA		/YES.  MAKE -0.0 A 0.0
       DAC*   .AB            /RESTORE
	.ENDC
       JMP*   .EB            /EXIT
	.IFUND %FPP
EB02          400000
EB03   CAL    0              /ANS SIGN
EB04          377777
	.ENDC
EB06          016000         / 2/PI (1) (0.63661977236)
              242763         /      (2)
EB08   CAL    0              /TEMP  (1)
       CAL    0              /      (2)
EB10   CAL    0              /INTEGER  STORAGE
EB14          1              /FLOATING 1 (1)
              200000         /           (2)
EB17          777774         /NO. OF COEFFICIENTS (4)
       .DSA   351764         /C4 (1) (+0.00015148419)
       .DSA   236657         /   (2)
       .DSA   615771         /C3 (1)  (-0.00467376557)
       .DSA   631114         /   (2)
       .DSA   537775         /C2  (1)  (+0.07968967928)
       .DSA   243150         /   (2)
       .DSA   603000         /C1 (1)  (-0.6459637111)
       .DSA   645273         /   (2)
       .DSA   552001         /(1)(1.570796318)
              311037         /(2)
	.IFDEF %FPP
EB18	0
	.ENDC
       .END
