function acosh, x ;+ ; NAME: ; ACOSH ; PURPOSE: ; Return the inverse hyperbolic sine of the argument ; EXPLANATION: ; The inverse hyperbolic sine is used for the calculation of acosh ; magnitudes, see Lupton et al. (1999, AJ, 118, 1406) ; ; CALLING SEQUENCE ; result = acosh( x) ; INPUTS: ; X - hyperbolic sine, numeric scalar or vector or multidimensional array ; (not complex) ; ; OUTPUT: ; result - inverse hyperbolic sine, same number of elements as X ; double precision if X is double, otherwise floating pt. ; ; METHOD: ; Expression given in Numerical Recipes, Press et al. (1992), eq. 5.6.8 ; ; REVISION HISTORY: ; MODIFICATION HISTORU FOR ASINH ; Written W. Landsman February, 2001 ; Work for multi-dimensional arrays W. Landsman August 2002 ; Simplify coding, and work for scalars again W. Landsman October 2003 ; MODIFICATION HISTORU FOR ACOSH ; Modified from asinh, Leslie Young, Aug 2006 ;- On_error,2 xx = 1.0 > x y = alog( xx + sqrt( xx^2 - 1.0) ) return, y end