17 * Returns hyperbolic cosine of argument in the range MINLOG to
20 * cosh(x) = ( exp(x) + exp(-x) )/2.
27 * arithmetic domain # trials peak rms
28 * DEC +- 88 50000 4.0e-17 7.7e-18
29 * IEEE +-MAXLOG 30000 2.6e-16 5.7e-17
34 * message condition value returned
35 * cosh overflow |x| > MAXLOG MAXNUM
43 Cephes Math Library Release 2.8: June, 2000
44 Copyright 1985, 1995, 2000 by Stephen L. Moshier
49 extern double exp ( double );
50 extern int isnan ( double );
51 extern int isfinite ( double );
54 int isnan(), isfinite();
56 extern double MAXLOG, INFINITY, LOGE2;
69 if( x > (MAXLOG + LOGE2) )
71 mtherr( "cosh", OVERFLOW );
74 if( x >= (MAXLOG - LOGE2) )
81 y = 0.5 * (y + 1.0 / y);