asinh.f

Go to the documentation of this file.
00001 *DECK ASINH
00002       FUNCTION ASINH (X)
00003 C***BEGIN PROLOGUE  ASINH
00004 C***PURPOSE  Compute the arc hyperbolic sine.
00005 C***LIBRARY   SLATEC (FNLIB)
00006 C***CATEGORY  C4C
00007 C***TYPE      SINGLE PRECISION (ASINH-S, DASINH-D, CASINH-C)
00008 C***KEYWORDS  ARC HYPERBOLIC SINE, ASINH, ELEMENTARY FUNCTIONS, FNLIB,
00009 C             INVERSE HYPERBOLIC SINE
00010 C***AUTHOR  Fullerton, W., (LANL)
00011 C***DESCRIPTION
00012 C
00013 C ASINH(X) computes the arc hyperbolic sine of X.
00014 C
00015 C Series for ASNH       on the interval  0.          to  1.00000D+00
00016 C                                        with weighted error   2.19E-17
00017 C                                         log weighted error  16.66
00018 C                               significant figures required  15.60
00019 C                                    decimal places required  17.31
00020 C
00021 C***REFERENCES  (NONE)
00022 C***ROUTINES CALLED  CSEVL, INITS, R1MACH
00023 C***REVISION HISTORY  (YYMMDD)
00024 C   770401  DATE WRITTEN
00025 C   890531  Changed all specific intrinsics to generic.  (WRB)
00026 C   890531  REVISION DATE from Version 3.2
00027 C   891214  Prologue converted to Version 4.0 format.  (BAB)
00028 C***END PROLOGUE  ASINH
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 C***FIRST EXECUTABLE STATEMENT  ASINH
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 C
00062       Y = ABS(X)
00063       IF (Y.GT.1.0) GO TO 20
00064 C
00065       ASINH = X
00066       IF (Y.GT.SQEPS) ASINH = X*(1.0 + CSEVL (2.*X*X-1., ASNHCS,NTERMS))
00067       RETURN
00068 C
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 C
00073       RETURN
00074       END
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines