dasinh.f

Go to the documentation of this file.
00001 *DECK DASINH
00002       DOUBLE PRECISION FUNCTION DASINH (X)
00003 C***BEGIN PROLOGUE  DASINH
00004 C***PURPOSE  Compute the arc hyperbolic sine.
00005 C***LIBRARY   SLATEC (FNLIB)
00006 C***CATEGORY  C4C
00007 C***TYPE      DOUBLE 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 DASINH(X) calculates the double precision arc hyperbolic
00014 C sine for double precision argument X.
00015 C
00016 C***REFERENCES  (NONE)
00017 C***ROUTINES CALLED  D1MACH, DCSEVL, INITDS
00018 C***REVISION HISTORY  (YYMMDD)
00019 C   770601  DATE WRITTEN
00020 C   890531  Changed all specific intrinsics to generic.  (WRB)
00021 C   890531  REVISION DATE from Version 3.2
00022 C   891214  Prologue converted to Version 4.0 format.  (BAB)
00023 C***END PROLOGUE  DASINH
00024       DOUBLE PRECISION X, ASNHCS(39), ALN2, SQEPS, XMAX, Y,
00025      1  DCSEVL, D1MACH
00026       LOGICAL FIRST
00027       SAVE ASNHCS, ALN2, NTERMS, XMAX, SQEPS, FIRST
00028       DATA ASNHCS(  1) / -.1282003991 1738186343 3721273592 68 D+0     /
00029       DATA ASNHCS(  2) / -.5881176118 9951767565 2117571383 62 D-1     /
00030       DATA ASNHCS(  3) / +.4727465432 2124815640 7252497560 29 D-2     /
00031       DATA ASNHCS(  4) / -.4938363162 6536172101 3601747902 73 D-3     /
00032       DATA ASNHCS(  5) / +.5850620705 8557412287 4948352593 21 D-4     /
00033       DATA ASNHCS(  6) / -.7466998328 9313681354 7550692171 88 D-5     /
00034       DATA ASNHCS(  7) / +.1001169358 3558199265 9661920158 12 D-5     /
00035       DATA ASNHCS(  8) / -.1390354385 8708333608 6164722588 86 D-6     /
00036       DATA ASNHCS(  9) / +.1982316948 3172793547 3173602371 48 D-7     /
00037       DATA ASNHCS( 10) / -.2884746841 7848843612 7472728003 17 D-8     /
00038       DATA ASNHCS( 11) / +.4267296546 7159937953 4575149959 07 D-9     /
00039       DATA ASNHCS( 12) / -.6397608465 4366357868 7526323096 81 D-10    /
00040       DATA ASNHCS( 13) / +.9699168608 9064704147 8782931311 79 D-11    /
00041       DATA ASNHCS( 14) / -.1484427697 2043770830 2466583656 96 D-11    /
00042       DATA ASNHCS( 15) / +.2290373793 9027447988 0401843789 83 D-12    /
00043       DATA ASNHCS( 16) / -.3558839513 2732645159 9789426513 10 D-13    /
00044       DATA ASNHCS( 17) / +.5563969408 0056789953 3745390885 54 D-14    /
00045       DATA ASNHCS( 18) / -.8746250959 9624678045 6665935201 62 D-15    /
00046       DATA ASNHCS( 19) / +.1381524884 4526692155 8688022981 29 D-15    /
00047       DATA ASNHCS( 20) / -.2191668828 2900363984 9551422641 49 D-16    /
00048       DATA ASNHCS( 21) / +.3490465852 4827565638 3139237068 80 D-17    /
00049       DATA ASNHCS( 22) / -.5578578840 0895742439 6301570321 06 D-18    /
00050       DATA ASNHCS( 23) / +.8944514661 7134012551 0508827989 33 D-19    /
00051       DATA ASNHCS( 24) / -.1438342634 6571317305 5518452394 66 D-19    /
00052       DATA ASNHCS( 25) / +.2319181187 2169963036 3261446826 66 D-20    /
00053       DATA ASNHCS( 26) / -.3748700795 3314343674 5706045439 99 D-21    /
00054       DATA ASNHCS( 27) / +.6073210982 2064279404 5492428800 00 D-22    /
00055       DATA ASNHCS( 28) / -.9859940276 4633583177 3701734400 00 D-23    /
00056       DATA ASNHCS( 29) / +.1603921745 2788496315 2326382933 33 D-23    /
00057       DATA ASNHCS( 30) / -.2613884735 0287686596 7161343999 99 D-24    /
00058       DATA ASNHCS( 31) / +.4267084960 6857390833 3581653333 33 D-25    /
00059       DATA ASNHCS( 32) / -.6977021703 9185243299 7307733333 33 D-26    /
00060       DATA ASNHCS( 33) / +.1142508833 6806858659 8126933333 33 D-26    /
00061       DATA ASNHCS( 34) / -.1873529207 8860968933 0210133333 33 D-27    /
00062       DATA ASNHCS( 35) / +.3076358441 4464922794 0659200000 00 D-28    /
00063       DATA ASNHCS( 36) / -.5057736403 1639824787 0463999999 99 D-29    /
00064       DATA ASNHCS( 37) / +.8325075471 2689142224 2133333333 33 D-30    /
00065       DATA ASNHCS( 38) / -.1371845728 2501044163 9253333333 33 D-30    /
00066       DATA ASNHCS( 39) / +.2262986842 6552784104 1066666666 66 D-31    /
00067       DATA ALN2 / 0.6931471805 5994530941 7232121458 18D0 /
00068       DATA FIRST /.TRUE./
00069 C***FIRST EXECUTABLE STATEMENT  DASINH
00070       IF (FIRST) THEN
00071          NTERMS = INITDS (ASNHCS, 39, 0.1*REAL(D1MACH(3)) )
00072          SQEPS = SQRT(D1MACH(3))
00073          XMAX = 1.0D0/SQEPS
00074       ENDIF
00075       FIRST = .FALSE.
00076 C
00077       Y = ABS(X)
00078       IF (Y.GT.1.0D0) GO TO 20
00079 C
00080       DASINH = X
00081       IF (Y.GT.SQEPS) DASINH = X*(1.0D0 + DCSEVL (2.D0*X*X-1.D0,
00082      1  ASNHCS, NTERMS) )
00083       RETURN
00084  20   IF (Y.LT.XMAX) DASINH = LOG (Y+SQRT(Y*Y+1.D0))
00085       IF (Y.GE.XMAX) DASINH = ALN2 + LOG(Y)
00086       DASINH = SIGN (DASINH, X)
00087       RETURN
00088 C
00089       END
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines