       .TITLE DCOS   COMPUTE COSINE OF DOUBLE ARGUMENT
/ 
/ 
/                   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,1973 DIGITAL EQUIPMENT CORP., MAYNARD, MASS. 01754
/EDIT 2  6 JUNE 71
/FOR HARDWARE FLOATING POINT PROCESSOR (FPP), DEFINE %FPP,
       .GLOBL DCOS,.DA,.DB
	.IFUND %FPP
	.GLOBL .AO,.AQ
	.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
/      JMS*   (DCOS)          SUBR CALL
/      JMP    .+2             SUBR RETURN
/      CAL/XCTADDR            ADDR OF ARGUMENT  (XCT IF INDIRECT)
/
DCOS   CAL    0              /ENTRY-EXIT
       JMS*   .DA            /GET ARGUMENT (.DA)
       JMP    DCOS02
DCOS01 CAL    0              /ARGUMENT
DCOS02 DLD%   .AO            /LOAD DOUBLE (.AO)
       .DSA   DCOS01+400000  / (ARG)
       DAD%   .AQ            /ADD DOUBLE (.AQ)
       .DSA   DCOS06         / (ARG+PI/2)
       JMS*   .DB            /COMPUTE SINE (.DB)
       JMP*   DCOS           /EXIT
DCOS06        1              / PI/2 (1)  (1.57079632679)
              311037         /      (2)
       .DSA   552421         /      (3)
       .END
