Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap1_198111 - decus/20-0025/comp1.for
There is 1 other file named comp1.for in the archive. Click here to see a list.
00010	C   COMP1.SRC     OLS     52 LINES
00020	C
00030	      FUNCTION COMP1(IND,A)
00040	C	EVALUATION OF HYPERBOLIC SINE, COSINE, TANGENT,
00050	C	ARC SINE, AND ARC COSINE
00060		SERIES(C,D)=C+C*D*(.16666782+D*(.0749469671+D*
00070	     +(.045520633+D*(.0239940153+D*.0424173419))))
00080	      GO TO (10,20,30,40,40),IND
00090	10    X1=ABS(A)
00100	      IF (X1-.3465735903)  12, 12, 14
00110	12    X1=X1*X1
00120	      COMP1=A*(1.+X1*(.16666666667+X1*(.00833333333+
00130	     +X1*.198412698E-3)))
00140	      GO TO 60
00150	14    COMP1=(EXP(A)-EXP(-A))/2
00160	      GO TO 60
00170	20    COMP1=(EXP(A)+EXP(-A))/2
00180	      GO TO 60
00190	30    IF (A)  32, 31, 32
00200	31    COMP1=0.
00210	      GO TO 60
00220	32    B=ABS(A)
00230	      IF (B-10.4)  34, 34, 33
00240	33    COMP1=SIGN(1.,A)
00250	      GO TO 60
00260	34    IF (B-.5493061442)  36, 36, 35
00270	35    COMP1=SIGN(1.-2./(1.+EXP(2.*B)),A)
00280	      GO TO 60
00290	36    B=B*B
00300	      COMP1=A/(1.+B/(3.+B/(5.+B/(7.+B/9.0274307))))
00310	      GO TO 60
00320	   40 B=ABS(A)
00330	      IF (B-1.0)  42, 42, 41
00340	41    COMP1=SIGN(5.789604E+36,A)
00350	      GO TO 60
00360	42    E=B*B
00370	      IF (1.-B)  46, 43, 46
00380	43    IF (IND-4)  44, 44, 45
00390	44    COMP1=SIGN(1.5707963268,A)
00400	      GO TO 60
00410	45    COMP1=1.5707963268-SIGN(1.5707963268,A)
00420	      GO TO 60
00430	46    IF (.5-B)  48, 47, 47
00440	47    COMP1=SIGN(SERIES(B,E),A)
00450	      IF (IND-4)  60, 60, 50
00460	48    B=SQRT((1.-B)/2.)
00470	      E=B*B
00480	      COMP1=SIGN(1.5707963268-2.*SERIES(B,E),A)
00490	      IF (IND-4)  60, 60, 50
00500	50    COMP1=1.5707963268-COMP1
00510	60    RETURN
00520	      END