diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-11-22 14:04:29 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-11-22 14:04:29 +0000 |
commit | 7ce331c01ce6eb7b3f5c715a38a24359da9c6ee2 (patch) | |
tree | 3a7e8476e868ae15f4da1b7ce26b2db6f434468c /libm/float/coshf.c | |
parent | c117dd5fb183afb1a4790a6f6110d88704be6bf8 (diff) |
Totally rework the math library, this time based on the MacOs X
math library (which is itself based on the math lib from FreeBSD).
-Erik
Diffstat (limited to 'libm/float/coshf.c')
-rw-r--r-- | libm/float/coshf.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/libm/float/coshf.c b/libm/float/coshf.c deleted file mode 100644 index 2b44fdeb3..000000000 --- a/libm/float/coshf.c +++ /dev/null @@ -1,67 +0,0 @@ -/* coshf.c - * - * Hyperbolic cosine - * - * - * - * SYNOPSIS: - * - * float x, y, coshf(); - * - * y = coshf( x ); - * - * - * - * DESCRIPTION: - * - * Returns hyperbolic cosine of argument in the range MINLOGF to - * MAXLOGF. - * - * cosh(x) = ( exp(x) + exp(-x) )/2. - * - * - * - * ACCURACY: - * - * Relative error: - * arithmetic domain # trials peak rms - * IEEE +-MAXLOGF 100000 1.2e-7 2.8e-8 - * - * - * ERROR MESSAGES: - * - * message condition value returned - * coshf overflow |x| > MAXLOGF MAXNUMF - * - * - */ - -/* cosh.c */ - -/* -Cephes Math Library Release 2.2: June, 1992 -Copyright 1985, 1987, 1992 by Stephen L. Moshier -Direct inquiries to 30 Frost Street, Cambridge, MA 02140 -*/ - -#include <math.h> -extern float MAXLOGF, MAXNUMF; - -float expf(float); - -float coshf(float xx) -{ -float x, y; - -x = xx; -if( x < 0 ) - x = -x; -if( x > MAXLOGF ) - { - mtherr( "coshf", OVERFLOW ); - return( MAXNUMF ); - } -y = expf(x); -y = y + 1.0/y; -return( 0.5*y ); -} |