acosh.f

Go to the documentation of this file.
00001 *DECK ACOSH
00002       FUNCTION ACOSH (X)
00003 C***BEGIN PROLOGUE  ACOSH
00004 C***PURPOSE  Compute the arc hyperbolic cosine.
00005 C***LIBRARY   SLATEC (FNLIB)
00006 C***CATEGORY  C4C
00007 C***TYPE      SINGLE PRECISION (ACOSH-S, DACOSH-D, CACOSH-C)
00008 C***KEYWORDS  ACOSH, ARC HYPERBOLIC COSINE, ELEMENTARY FUNCTIONS, FNLIB,
00009 C             INVERSE HYPERBOLIC COSINE
00010 C***AUTHOR  Fullerton, W., (LANL)
00011 C***DESCRIPTION
00012 C
00013 C ACOSH(X) computes the arc hyperbolic cosine of X.
00014 C
00015 C***REFERENCES  (NONE)
00016 C***ROUTINES CALLED  R1MACH, XERMSG
00017 C***REVISION HISTORY  (YYMMDD)
00018 C   770401  DATE WRITTEN
00019 C   890531  Changed all specific intrinsics to generic.  (WRB)
00020 C   890531  REVISION DATE from Version 3.2
00021 C   891214  Prologue converted to Version 4.0 format.  (BAB)
00022 C   900315  CALLs to XERROR changed to CALLs to XERMSG.  (THJ)
00023 C   900326  Removed duplicate information from DESCRIPTION section.
00024 C           (WRB)
00025 C***END PROLOGUE  ACOSH
00026       SAVE ALN2,XMAX
00027       DATA ALN2 / 0.6931471805 5994530942E0/
00028       DATA XMAX /0./
00029 C***FIRST EXECUTABLE STATEMENT  ACOSH
00030       IF (XMAX.EQ.0.) XMAX = 1.0/SQRT(R1MACH(3))
00031 C
00032       IF (X .LT. 1.0) CALL XERMSG ('SLATEC', 'ACOSH', 'X LESS THAN 1',
00033      +   1, 2)
00034 C
00035       IF (X.LT.XMAX) ACOSH = LOG (X + SQRT(X*X-1.0))
00036       IF (X.GE.XMAX) ACOSH = ALN2 + LOG(X)
00037 C
00038       RETURN
00039       END
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines