Go to the documentation of this file.00001
00002 FUNCTION ASINH (X)
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 DIMENSION ASNHCS(20)
00030 LOGICAL FIRST
00031 SAVE ALN2, ASNHCS, NTERMS, XMAX, SQEPS, FIRST
00032 DATA ALN2 /0.6931471805 5994530942E0/
00033 DATA ASNHCS( 1) / -.1282003991 1738186E0 /
00034 DATA ASNHCS( 2) / -.0588117611 89951768E0 /
00035 DATA ASNHCS( 3) / .0047274654 32212481E0 /
00036 DATA ASNHCS( 4) / -.0004938363 16265361E0 /
00037 DATA ASNHCS( 5) / .0000585062 07058557E0 /
00038 DATA ASNHCS( 6) / -.0000074669 98328931E0 /
00039 DATA ASNHCS( 7) / .0000010011 69358355E0 /
00040 DATA ASNHCS( 8) / -.0000001390 35438587E0 /
00041 DATA ASNHCS( 9) / .0000000198 23169483E0 /
00042 DATA ASNHCS(10) / -.0000000028 84746841E0 /
00043 DATA ASNHCS(11) / .0000000004 26729654E0 /
00044 DATA ASNHCS(12) / -.0000000000 63976084E0 /
00045 DATA ASNHCS(13) / .0000000000 09699168E0 /
00046 DATA ASNHCS(14) / -.0000000000 01484427E0 /
00047 DATA ASNHCS(15) / .0000000000 00229037E0 /
00048 DATA ASNHCS(16) / -.0000000000 00035588E0 /
00049 DATA ASNHCS(17) / .0000000000 00005563E0 /
00050 DATA ASNHCS(18) / -.0000000000 00000874E0 /
00051 DATA ASNHCS(19) / .0000000000 00000138E0 /
00052 DATA ASNHCS(20) / -.0000000000 00000021E0 /
00053 DATA FIRST /.TRUE./
00054
00055 IF (FIRST) THEN
00056 NTERMS = INITS (ASNHCS, 20, 0.1*R1MACH(3))
00057 SQEPS = SQRT (R1MACH(3))
00058 XMAX = 1.0/SQEPS
00059 ENDIF
00060 FIRST = .FALSE.
00061
00062 Y = ABS(X)
00063 IF (Y.GT.1.0) GO TO 20
00064
00065 ASINH = X
00066 IF (Y.GT.SQEPS) ASINH = X*(1.0 + CSEVL (2.*X*X-1., ASNHCS,NTERMS))
00067 RETURN
00068
00069 20 IF (Y.LT.XMAX) ASINH = LOG (Y + SQRT(Y**2+1.))
00070 IF (Y.GE.XMAX) ASINH = ALN2 + LOG(Y)
00071 ASINH = SIGN (ASINH, X)
00072
00073 RETURN
00074 END