MTH$ATAN        ; Floating Point Arc Tangent Functions (ATAN,AT  21-AUG-1978 19:02:01   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (2)     100  HISTORY	; Detailed Current Edit History

   (3)     100  DECLARATIONS	; Declarative Part of Module

   (4)     100  MTH$ATAN - Standard Single Precision Floating A

   (5)     100  MTH$ATAN2 - Standard floating Arctangent With 2

   (6)     100  MTH$ATAN_R4 - Special ATAN routine

MTH$ATAN        ; Floating Point Arc Tangent Functions (ATAN,AT  21-AUG-1978 19:02:01   VAX-11 MACRO X0.3-11               Page   1

01-6                                                                                                                             (1)



                                     0000   100 	.TITLE	MTH$ATAN	; Floating Point Arc Tangent Functions (ATAN,ATAN2)

                                     0000   200 	.IDENT /01-6/		; File: MTHATAN.MAR

                                     0000   300 ;

                                     0000   400 ; Copyright (C) 1977

                                     0000   500 ; Digital Equipment Corporation, Maynard, Massachusetts 01754

                                     0000   600 ;

                                     0000   700 ; This software is furnished under a license for use only on a single

                                     0000   800 ; computer  system  and  may be copied only with the inclusion of the

                                     0000   900 ; above copyright notice. This software, or any other copies thereof,

                                     0000  1000 ; may not be provided or otherwise made available to any other person

                                     0000  1100 ; except for use on such system and to one who agree to these license 

                                     0000  1200 ; terms.  Title to  and  ownership of the software shall at all times 

                                     0000  1300 ; remain in DEC.

                                     0000  1400 ;

                                     0000  1500 ; The information in the software is subject to change without notice

                                     0000  1600 ; and should  not  be construed  as a commitment by Digital Equipment 

                                     0000  1700 ; Corporation.

                                     0000  1800 ;

                                     0000  1900 ; DEC assumes  no  responsibility  for the use or  reliability of its

                                     0000  2000 ; software on equipment which is not supplied by DEC.

                                     0000  2100 ;

                                     0000  2200 ;

                                     0000  2300 ; FACILITY: MATH LIBRARY

                                     0000  2400 ;++

                                     0000  2500 ; ABSTRACT:

                                     0000  2600 ;

                                     0000  2700 ; MTH$ATAN is a function which returns the floating point arc tangent

                                     0000  2800 ; value  of  its single precision floating point argument.  MTH$ATAN2

                                     0000  2900 ; is two arguments floating point arctangent. The call is standard call-

                                     0000  3000 ; by-reference.

                                     0000  3100 ; MTH$ATAN_R4  is  a  special  routine  which is the same as MTH$ATAN

                                     0000  3200 ; except a faster non-standard JSB call is  used with the argument in

                                     0000  3300 ; R0 and no registers are saved.

                                     0000  3400 ;

                                     0000  3500 ;--

                                     0000  3600 ;

                                     0000  3700 ; VERSION: 01

                                     0000  3800 ;

                                     0000  3900 ; HISTORY:

                                     0000  4000 ; AUTHOR:

                                     0000  4100 ;	Peter Yuo, 15-Oct-76: Version 01

                                     0000  4200 ;

                                     0000  4300 ; MODIFIED BY:

                                     0000  4400 ;

                                     0000  4500 ; 01-1	Peter Yuo, 22-May-77

                                     0000  4600 ;

                                     0000  4700 ;

MTH$ATAN        ; Floating Point Arc Tangent Functions (ATAN,AT  21-AUG-1978 19:02:01   VAX-11 MACRO X0.3-11               Page   2

01-6            HISTORY ; Detailed Current Edit History                                                                          (2)



                                     0000   100 	.SBTTL	HISTORY	; Detailed Current Edit History

                                     0000   200 

                                     0000   300 

                                     0000   400 ; ALGORITHMIC DIFFERENCES FROM FP-11/C ROUTINE:

                                     0000   500 ;	1. To avoid various flags subroutine calls have been used.

                                     0000   600 ;

                                     0000   700 ; Edit History for Version 01 of MTH$ATANATAN2

                                     0000   800 ;

                                     0000   900 ; 01-1	Code saving from code review March 1977

                                     0000  1000 ;	Add jacket routine to MTH$ATAN2

                                     0000  1100 ;	Use proper form of literals so MTH$ATAN2 will work

                                     0000  1200 ;

                                     0000  1300 ; 01-5	Signal (0, 0) as INVALID ARG TO MATH LIBRARY.  TNH 16-June-78

                                     0000  1400 

                                     0000  1500 ; 01-6	Move .ENTRY mask definition to module header.  TNH 14-Aug-78

MTH$ATAN        ; Floating Point Arc Tangent Functions (ATAN,AT  21-AUG-1978 19:02:01   VAX-11 MACRO X0.3-11               Page   3

01-6            DECLARATIONS ; Declarative Part of Module                                                                        (3)



                                     0000   100 	.SBTTL	DECLARATIONS	; Declarative Part of Module

                                     0000   200 

                                     0000   300 ;

                                     0000   400 ; INCLUDE FILES:	OTSPARAMS.MAR

                                     0000   500 ;

                                     0000   600 ; EXTERNAL SYMBOLS:	MTH$JACKET_HDLR

                                     0000   700 ;

                                     0000   710 	.DSABL	GBL			; Declare all .EXTRN symbols

                                     0000   720 	.EXTRN	MTH$$SIGNAL		; Signal SEVERE error

                                     0000   800 ; EQUATED SYMBOLS:

                                     0000   900 

                           0000401C  0000   950 	ACMASK = ^M<IV, R2, R3, R4>	; .ENTRY register mask, int ovf enabled

                           0FDBC0C9  0000  1000 	LF_MPI_OVER_2 = ^O007733@16 + ^O140311 

                                     0000  1100 					; -PI/2

                           0FDB4149  0000  1200 	LF_PI = ^O007733@16 + 	^O040511

                                     0000  1300 					; PI

                           0FDB40C9  0000  1400 	LF_PI_OVER_2 = ^O007733@16 + ^O040311

                                     0000  1500 					; PI/2

                           0A924006  0000  1600 	LF_PI_OVER_6 = ^O005222@16 + ^O040006

                                     0000  1700 					; PI/6

                           B3D740DD  0000  1800 	LF_SQRT_3 = ^O131727@16 + ^O040335

                                     0000  1900 					; SQRT(3)

                           30A33F89  0000  2000 	LF_TAN_PI_OV_12 = ^O030243@16 +	^O037611

                                     0000  2100 					; TAN(PI/12)

                                     0000  2200 ;

                                     0000  2300 ; MACROS:	none

                                     0000  2400 ;

                                     0000  2500 ; PSECT DECLARATIONS:

                                     0000  2600 

                                 00000000  2700 	.PSECT	MTH$CODE	PIC,SHR,LONG,EXE,NOWRT

                                     0000  2800 					; program section for math routines

                                     0000  2900 ;

                                     0000  3000 ; OWN STORAGE:	none

                                     0000  3100 ;

                                     0000  3200 ; CONSTANTS:

                                     0000  3300 

                                     0000  3400 ;

                                     0000  3500 ; Table to be used in POLY

                                     0000  3600 ;

                                     0000  3700 ATANTAB:

                          3AC2 3EC5  0000  3800 	.WORD	^O037305, ^O035302	; C4 = 0.0963034789

                          5D4C BF11  0004  3900 	.WORD	^O137421, ^O056514	; C3 = -0.1419574624

                          C6DB 3F4C  0008  4000 	.WORD	^O037514, ^O143333	; C2 = 0.1999773201

                          AAA4 BFAA  000C  4100 	.WORD	^O137652, ^O125244	; C1 = -0.3333331319

                          0000 4080  0010  4200 	.WORD	^O040200, ^O000000	; C0 = 0.9999999999

                           00000005  0014  4300 ATANLEN = .- ATANTAB/4

                                     0014  4400 

                                     0014  4500 

MTH$ATAN        ; Floating Point Arc Tangent Functions (ATAN,AT  21-AUG-1978 19:02:01   VAX-11 MACRO X0.3-11               Page   4

01-6            MTH$ATAN - Standard Single Precision Floating A                                                                  (4)



                                     0014   100 	.SBTTL	MTH$ATAN - Standard Single Precision Floating Arc Tangent

                                     0014   200 

                                     0014   300 

                                     0014   400 ;++

                                     0014   500 ; FUNCTIONAL DESCRIPTION:

                                     0014   600 ;

                                     0014   700 ; ATAN - single precision floating point function

                                     0014   800 ;

                                     0014   900 ; ATAN(X) is computed by the following calculation steps:

                                     0014  1000 ;

                                     0014  1100 ;	1. If X < 0 then

                                     0014  1200 ;	   begin

                                     0014  1300 ;		perform steps 2, 3, and 4 with arg = |X|

                                     0014  1400 ;		negate the result since ATAN(X) = -ATAN(-X)

                                     0014  1500 ;		return

                                     0014  1600 ;	   end

                                     0014  1700 ;

                                     0014  1800 ;	2. At this point argument is positive or has been made positive.

                                     0014  1900 ;	   If X > 1 then

                                     0014  2000 ;	   begin

                                     0014  2100 ;		perform steps 3 and 4 with arg = 1/|X|

                                     0014  2200 ;		negate result and add a bias of PI/2 since ATAN(|X|) = PI/2 -

                                     0014  2300 ;		ATAN(1/|X|)

                                     0014  2400 ;		return

                                     0014  2500 ;	   end

                                     0014  2600 ;

                                     0014  2700 ;	3. At this point the argument is 1 >= X >= 0

                                     0014  2800 ;	   If |X| > TAN(PI/12) then

                                     0014  2900 ;	   begin

                                     0014  3000 ;		perform step 4 with arg = (X*SQRT(3) - 1) / (SQRT(3) + X)

                                     0014  3100 ;		add PI/6 to the result

                                     0014  3200 ;		return

                                     0014  3300 ;	   end

                                     0014  3400 ;	Note: (X*SQRT(3) - 1) / (X + SQRT(3)) >= TAN(PI/12) for |X| >= TAN(PI/12)

                                     0014  3500 ;

                                     0014  3600 ;	4. Finally the argument is |X| >= TAN(PI/12)

                                     0014  3700 ;	   do begin

                                     0014  3800 ;		ATAN(X) = X * SUM(Ci * X**(2i)), i = 0:4

                                     0014  3900 ;		return

                                     0014  4000 ;	   end

                                     0014  4100 ;

                                     0014  4200 ;	   The coefficients Ci's are drawn from Hart #4941

                                     0014  4300 ;	   The relative error is =< 10**-9.54

                                     0014  4400 ;

                                     0014  4500 ; CALLING SEQUENCE:

                                     0014  4600 ;

                                     0014  4700 ;	Arctangent.wf.v = MTH$ATAN(x.rf.r)

                                     0014  4800 ;

                                     0014  4900 ; INPUT PARAMETERS:

                                     0014  5000 

                           00000004  0014  5100 	LONG = 4			; define longword multiplier

                           00000004  0014  5200 	x = 1 * LONG			; x is an angle in radians

                                     0014  5300 ;

                                     0014  5400 ; IMPLICIT INPUTS:	none

                                     0014  5500 ;

                                     0014  5600 ; OUTPUT PARAMETERS:

                                     0014  5700 ;

MTH$ATAN        ; Floating Point Arc Tangent Functions (ATAN,AT  21-AUG-1978 19:02:01   VAX-11 MACRO X0.3-11               Page   5

01-6            MTH$ATAN - Standard Single Precision Floating A                                                                  (4)



                                     0014  5800 ;	VALUE:	floating arctangent angle of the argument

                                     0014  5900 ;

                                     0014  6000 ; IMPLICIT OUTPUTS:	none

                                     0014  6100 ;

                                     0014  6200 ; SIDE EFFECTS:

                                     0014  6300 ;

                                     0014  6400 ; Signals:	none

                                     0014  6500 ;

                                     0014  6600 ; NOTE: This procedure disables floating point underflow and integer

                                     0014  6700 ; overflow, causes no floating overflow or other arithmetic traps, and

                                     0014  6800 ; preserves enables across the call.

                                     0014  6900 ;

                                     0014  7000 ;---

                                     0014  7100 

                                     0014  7200 

                               401C' 0014  7300 	.ENTRY	MTH$ATAN, ACMASK	; standard call-by-reference entry

                                     0016  7400 					; disable DV (and FU), enable IV

                                     0016  7500 	MTH$FLAG_JACKET			; flag that this is a jacket procedure in

                                     0016      

            6D       0000'CF     3E  0016       	MOVAW	W^MTH$$JACKET_HND, (FP)

                                     001B       					; set handler address to jacket

                                     001B       					; handler

                                     001B       

                                     001B  7600 					; case of an error in special JSB routine

            50         04 BC     50  001B  7700 	MOVF	@x(AP), R0		; R0 = arg 

                          6E     10  001F  7800 	BSBB	MTH$ATAN_R4		; call special ATAN rountine

                                 04  0021  7900 	RET				; return - result in R0

                                     0022  8000 

MTH$ATAN        ; Floating Point Arc Tangent Functions (ATAN,AT  21-AUG-1978 19:02:01   VAX-11 MACRO X0.3-11               Page   6

01-6            MTH$ATAN2 - Standard floating Arctangent With 2                                                                  (5)



                                     0022   100 	.SBTTL	MTH$ATAN2 - Standard floating Arctangent With 2 Arguments

                                     0022   200 ;++

                                     0022   300 ; FUNCTIONAL DESCRIPTION:

                                     0022   400 ;

                                     0022   500 ; ATAN2  - single precision floating point function

                                     0022   600 ;

                                     0022   700 ; ATAN2(X,Y) is computed as following:

                                     0022   800 ;

                                     0022   900 ;	If Y = 0 or X/Y > 2**25, ATAN2(X,Y) = PI/2 * (sign X)

                                     0022  1000 ;	If Y > 0 and X/Y =< 2**25, ATAN2(X,Y) = ATAN(X/Y)

                                     0022  1100 ;	If Y < 0 and X/Y =< 2**25, ATAN2(X,Y) = PI * (sign X) + ATAN(X/Y)

                                     0022  1200 ;

                                     0022  1300 ;

                                     0022  1400 ; CALLING SEQUENCE:

                                     0022  1500 ;

                                     0022  1600 ;	Arctangent2.wf.v = MTH$ATAN2(x.rf.r, y.rf.r)

                                     0022  1700 ;

                                     0022  1800 ; INPUT PARAMETERS:

                                     0022  1900 

                           00000004  0022  2000 	x = 1 * LONG			; x is the first argument

                           00000008  0022  2100 	y = 2 * LONG			; y is the second argument

                                     0022  2200 

                                     0022  2300 ; SIDE EFFECTS:	See description of MTH$ATAN 

                                     0022  2400 ;

                                     0022  2500 ;--

                                     0022  2600 

                                     0022  2700 

                               401C' 0022  2800 	.ENTRY	MTH$ATAN2 ,ACMASK	; standard call-by-reference entry

                                     0024  2900 					; disable DV (and FU), enable IV

                                     0024  3000 	MTH$FLAG_JACKET			; flag that this is jacket procedure

                                     0024      

            6D       0000'CF     3E  0024       	MOVAW	W^MTH$$JACKET_HND, (FP)

                                     0029       					; set handler address to jacket

                                     0029       					; handler

                                     0029       

                                     0029  3100 					; in case of an error in special JSB routine

            50         04 BC     50  0029  3200 	MOVF	@x(AP), R0		; R0 = arg1 

            51         08 BC     50  002D  3300 	MOVF	@y(AP), R1		; R1 = arg2

                                     0031  3400 ;

                                     0031  3500 ; Test if Y = 0 or X/Y > 2**25

                                     0031  3600 ;

                          35     13  0031  3700 	BEQL	INF			; branch to INF if Y = 0

            50       807F 8F     AB  0033  3800 	BICW3	#^X807F, R0, R2		; R2 = exponent(X)

                          52         0038       

            51       807F 8F     AB  0039  3900 	BICW3	#^X807F, R1, R3		; R3 = exponent(Y)

                          53         003E       

            52            53     A2  003F  4000 	SUBW	R3, R2			; R2 = exponent(X) - exponent(Y)

       0D00 8F            52     B1  0042  4100 	CMPW	R2, #26*128		; compare R2 with 26

                          1F     14  0047  4200 	BGTR	INF			; if X/Y > 2**25, branch to INF

                                     0049  4300 ;

                                     0049  4400 ; Test if Y > 0 or Y < 0

                                     0049  4500 ;

                          51     B5  0049  4600 	TSTW	R1			; test the sign of Y

                          18     14  004B  4700 	BGTR	A2PLUS			; branch to A2PLUS if Y > 0

                          50     B5  004D  4800 	TSTW	R0			; test the sign of X

                          0A     18  004F  4900 	BGEQ	A1PLUS			; branch to A1PLUS if X >= 0

                                     0051  5000 ;

MTH$ATAN        ; Floating Point Arc Tangent Functions (ATAN,AT  21-AUG-1978 19:02:01   VAX-11 MACRO X0.3-11               Page   7

01-6            MTH$ATAN2 - Standard floating Arctangent With 2                                                                  (5)



                                     0051  5100 ; Y < 0 and X < 0 and X/Y =< 2**25

                                     0051  5200 ;

                          39     10  0051  5300 	BSBB	MTH$ATAN_R4D		; R0 = ATAN(X/Y)

            50   0FDB4149 8F     42  0053  5400 	SUBF	#LF_PI, R0		; R0 = -PI + ATAN(X/Y)

                                 04  005A  5500 	RET				; return

                                     005B  5600 ;

                                     005B  5700 ; Y < 0 and X > 0 and X/Y =< 2**25

                                     005B  5800 ;

                                     005B  5900 A1PLUS:

                          2F     10  005B  6000 	BSBB	MTH$ATAN_R4D		; R0 = ATAN(X/Y)

            50   0FDB4149 8F     40  005D  6100 	ADDF	#LF_PI, R0		; R0 = PI + ATAN(X/Y)

                                 04  0064  6200 	RET				; return

                                     0065  6300 ;

                                     0065  6400 ; Y > 0 and X/Y =< 2**25

                                     0065  6500 ;

                                     0065  6600 A2PLUS:

                          25     10  0065  6700 	BSBB	MTH$ATAN_R4D		; R0 = ATAN(X/Y)

                                 04  0067  6800 	RET				; return

                                     0068  6900 ;

                                     0068  7000 ; Y = 0 or X/Y > 2**25

                                     0068  7100 ;

                                     0068  7200 INF:

                          50     B5  0068  7300 	TSTW	R0			; test the sign of X

                          0A     14  006A  7400 	BGTR	1$			; branch if X > 0

                          10     13  006C  7410 	BEQL	2$			; branch if X = 0

            50   0FDBC0C9 8F     50  006E  7500 	MOVF	#LF_MPI_OVER_2, R0	; R0 = ATAN(X/Y) = -PI/2

                                 04  0075  7600 	RET				; return

                                     0076  7610 

            50   0FDB40C9 8F     50  0076  7700 1$:	MOVF	#LF_PI_OVER_2, R0	; R0 = ATAN(X/Y) = PI/2

                                 04  007D  7800 	RET				; return

                                     007E  7810 

                                     007E  7820 ;+

                                     007E  7830 ; Here if X = 0 and Y = 0.  Signal INVALID ARG TO MATH LIBRARY

                                     007E  7840 ; as a SEVERE error.

                                     007E  7850 ;-

                                     007E  7860 

            01            0F     79  007E  7870 2$:	ASHQ	#15, #1, R0		; R0/R1 = reserved operand which

                          50         0081       

                                     0082  7880 					; is copied to CHF$L_MCH_SAVR0/R1

                                     0082  7890 					; so a handler can fixup if wants to continue

            7E         51 8F     9A  0082  7900 	MOVZBL	#MTH__INVARG, -(SP)	; code for INVALID ARG TO MATH LIBRARY

       0000'CF            01     FB  0086  7910 	CALLS	#1, W^MTH$$SIGNAL	; signal SEVERE error

                                 04  008B  7920 	RET				; return if handler continues

MTH$ATAN        ; Floating Point Arc Tangent Functions (ATAN,AT  21-AUG-1978 19:02:01   VAX-11 MACRO X0.3-11               Page   8

01-6            MTH$ATAN_R4 - Special ATAN routine                                                                               (6)



                                     008C   100 	.SBTTL	MTH$ATAN_R4 - Special ATAN routine

                                     008C   200 

                                     008C   300 ; Special ATAN - used by the standard routine, and directly.

                                     008C   400 ;

                                     008C   500 ; CALLING SEQUENCES:

                                     008C   600 ;	save anything needed in R0:R4

                                     008C   700 ;	MOVF	...,R0			; input in R0

                                     008C   800 ;	JSB	MTH$ATAN_R4

                                     008C   900 ;	return with result in R0

                                     008C  1000 ; Note: This routine is written to avoid causing any integer overflows, floating

                                     008C  1100 ; overflows, or floating underflows or divide by 0 conditions, whether enabled or

                                     008C  1200 ; not.

                                     008C  1300 ;

                                     008C  1400 ; REGISTERS USED:

                                     008C  1500 ;	R0 - Floating argument then result

                                     008C  1600 ;	R0:R3 - POLYF

                                     008C  1700 ;	R4 - Y during POLYF

                                     008C  1800 

                                     008C  1900 

                                     008C  2200 

                                     008C  2300 MTH$ATAN_R4D:

            50            51     46  008C  2400 	DIVF	R1, R0			; for our own use only!

                                     008F  2500 MTH$ATAN_R4::				; Special ATAN routine

                          50     53  008F  2600 	TSTF	R0			; test the sign of X

                          0B     18  0091  2700 	BGEQ	POSTAN			; branch if X is positive

                                     0093  2800 ;

                                     0093  2900 ; X < 0

                                     0093  3000 ;

            50       8000 8F     AA  0093  3100 	BICW	#^O100000, R0		; R0 = -X

                          04     10  0098  3200 	BSBB	POSTAN			; branch to calculate ATAN(-X)

            50            50     52  009A  3300 	MNEGF	R0, R0			; R0 = ATAN(X) = -ATAN(-X)

                                 05  009D  3400 	RSB				; return, R0 = ATAN(X)

                                     009E  3500 ;

                                     009E  3600 ; Subroutine:

                                     009E  3700 ;	Input: R0 = X (>= 0)

                                     009E  3800 ;	Output: R0 = ATAN(X)

                                     009E  3900 ;

                                     009E  4000 POSTAN:

            08            50     51  009E  4100 	CMPF	R0, #1			; compare X with 1.0

                          0F     15  00A1  4200 	BLEQ	LEQ_THAN_1		; branch if |X| =< 1

                                     00A3  4300 ;

                                     00A3  4400 ; |X| > 1

                                     00A3  4500 ;

            08            50     47  00A3  4600 	DIVF3	R0, #1, R0		; R0 = 1/|X|

                          50         00A6       

                          09     10  00A7  4700 	BSBB	LEQ_THAN_1		; jump to calculate ATAN(1/|X|)

   0FDB40C9 8F            50     43  00A9  4800 	SUBF3	R0, #LF_PI_OVER_2, R0	; R0 = PI/2 - ATAN(1/|X|)

                          50         00B0       

                                 05  00B1  4900 	RSB				; return, R0 = ATAN(|X|)= ATAN(1/|X|)

                                     00B2  5000 ;

                                     00B2  5100 ; Subroutine:

                                     00B2  5200 ;	Input: R0 = X (=< 1)

                                     00B2  5300 ;	Output: R0 = ATAN(X)

                                     00B2  5400 ;

                                     00B2  5500 LEQ_THAN_1:

   30A33F89 8F            50     51  00B2  5600 	CMPF	R0, #LF_TAN_PI_OV_12	; compare X with TAN(PI/12)

                          2A     15  00B9  5700 	BLEQ	LE_TAN_PI_OV_12	; branch if R0 =< TAN(PI/12)

MTH$ATAN        ; Floating Point Arc Tangent Functions (ATAN,AT  21-AUG-1978 19:02:01   VAX-11 MACRO X0.3-11               Page   9

01-6            MTH$ATAN_R4 - Special ATAN routine                                                                               (6)



                                     00BB  5800 ;

                                     00BB  5900 ; TAN(PI/12) < |X| =< 1

                                     00BB  6000 ;

            50   B3D740DD 8F     45  00BB  6100 	MULF3	#LF_SQRT_3, R0, R4	; R4 = SQRT(3) * X

                          54         00C2       

            54            08     42  00C3  6200 	SUBF	#1, R4			; R4 = SQRT(3) * X - 1

            50   B3D740DD 8F     40  00C6  6300 	ADDF	#LF_SQRT_3, R0		; R0 = X + SQRT(3)

            54            50     46  00CD  6400 	DIVF	R0, R4			; R4 = Y = (SQRT(3)*X-1)/(X+SQRT(3))

            54            54     45  00D0  6500 	MULF3	R4, R4, R0		; R0 = Y * Y

                          50         00D3       

            04            50     55  00D4  6600 	POLYF	R0, #ATANLEN-1, ATANTAB	; R0 = SUM(Ci*Y**2i)

                     FF26 CF         00D7       

            50            54     44  00DA  6700 	MULF	R4, R0			; R0 = Y*SUM(Ci*Y**2i)

            50   0A924006 8F     40  00DD  6800 	ADDF	#LF_PI_OVER_6, R0	; R0 = PI/6 + ATAN(Q)

                                 05  00E4  6900 	RSB				; return, R0 = ATAN(|X|)= PI/6 + ATAN(Q)

                                     00E5  7000 ;

                                     00E5  7100 ; 0 =< X =< TAN(PI/12)

                                     00E5  7200 ;

                                     00E5  7300 LE_TAN_PI_OV_12:

            54            50     50  00E5  7400 	MOVF	R0, R4			; R4 = Y

            50            54     44  00E8  7500 	MULF	R4, R0			; R0 = Y*Y

            04            50     55  00EB  7600 	POLYF	R0, #ATANLEN-1, ATANTAB	; R0 = SUM(Ci*Y**2i)

                     FF0F CF         00EE       

            50            54     44  00F1  7700 	MULF	R4, R0			; R0 = Y * SUM(Ci*Y**2i)

                                 05  00F4  7800 	RSB				; R0 = ATAN(X) = X * SUM(Ci*X**2I)

                                     00F5  7900 

                                     00F5  8000 

                                     00F5  8100 

                                     00F5  8200 	.END

MTH$ATAN        ; Floating Point Arc Tangent Functions (ATAN,AT  21-AUG-1978 19:02:01   VAX-11 MACRO X0.3-11               Page  10

SYMBOL TABLE                                                                                                                     (6)



A1PLUS           0000005B R     02   

A2PLUS           00000065 R     02   

ACMASK         = 0000401C            

ATANLEN        = 00000005            

ATANTAB          00000000 R     02   

FOR$K_ERR_PREFX= 00000018            

INF              00000068 R     02   

LEQ_THAN_1       000000B2 R     02   

LE_TAN_PI_OV_12  000000E5 R     02   

LF_MPI_OVER_2  = 0FDBC0C9            

LF_PI          = 0FDB4149            

LF_PI_OVER_2   = 0FDB40C9            

LF_PI_OVER_6   = 0A924006            

LF_SQRT_3      = B3D740DD            

LF_TAN_PI_OV_12= 30A33F89            

LONG           = 00000004            

MTH$$JACKET_HND  ********   X   02   

MTH$$SIGNAL      ********   X   01   

MTH$ATAN         00000014 RG    02   

MTH$ATAN2        00000022 RG    02   

MTH$ATAN_R4      0000008F RG    02   

MTH$ATAN_R4D     0000008C R     02   

MTH$K_ERR_PREFX= 00000016            

MTH__FLOOVEMAT = 00000058            

MTH__FLOUNDMAT = 00000059            

MTH__INVARG    = 00000051            

MTH__LOGZERNEG = 00000053            

MTH__SINSIGLOS = 00000057            

MTH__SQUROONEG = 00000054            

MTH__UNDEXP    = 00000052            

MTH__WRONUMARG = 00000050            

POSTAN           0000009E R     02   

X              = 00000004            

Y              = 00000008            





PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

MTH$CODE         000000F5      02       PIC   USR   CON   REL   LCL   SHR   EXE   RD  NOWRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

27596. BYTES LEFT IN FREE MEMORY POOL.

OBJ$:MTHATAN,LIS$:MTHATAN/-SP=LIB$:S/ML,SRC$:P,MTHATAN

0 MLB DIR RDS - 0 GETS TO DEFINE 0 MACROS. 4 INTER. FILE WRITES. 

