summaryrefslogtreecommitdiff
path: root/libm/ldouble/coshl.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-11-22 14:04:29 +0000
committerEric Andersen <andersen@codepoet.org>2001-11-22 14:04:29 +0000
commit7ce331c01ce6eb7b3f5c715a38a24359da9c6ee2 (patch)
tree3a7e8476e868ae15f4da1b7ce26b2db6f434468c /libm/ldouble/coshl.c
parentc117dd5fb183afb1a4790a6f6110d88704be6bf8 (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/ldouble/coshl.c')
-rw-r--r--libm/ldouble/coshl.c89
1 files changed, 0 insertions, 89 deletions
diff --git a/libm/ldouble/coshl.c b/libm/ldouble/coshl.c
deleted file mode 100644
index 46212ae44..000000000
--- a/libm/ldouble/coshl.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* coshl.c
- *
- * Hyperbolic cosine, long double precision
- *
- *
- *
- * SYNOPSIS:
- *
- * long double x, y, coshl();
- *
- * y = coshl( x );
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns hyperbolic cosine of argument in the range MINLOGL to
- * MAXLOGL.
- *
- * cosh(x) = ( exp(x) + exp(-x) )/2.
- *
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE +-10000 30000 1.1e-19 2.8e-20
- *
- *
- * ERROR MESSAGES:
- *
- * message condition value returned
- * cosh overflow |x| > MAXLOGL+LOGE2L INFINITYL
- *
- *
- */
-
-
-/*
-Cephes Math Library Release 2.7: May, 1998
-Copyright 1985, 1991, 1998 by Stephen L. Moshier
-*/
-
-#include <math.h>
-extern long double MAXLOGL, MAXNUML, LOGE2L;
-#ifdef ANSIPROT
-extern long double expl ( long double );
-extern int isnanl ( long double );
-#else
-long double expl(), isnanl();
-#endif
-#ifdef INFINITIES
-extern long double INFINITYL;
-#endif
-#ifdef NANS
-extern long double NANL;
-#endif
-
-long double coshl(x)
-long double x;
-{
-long double y;
-
-#ifdef NANS
-if( isnanl(x) )
- return(x);
-#endif
-if( x < 0 )
- x = -x;
-if( x > (MAXLOGL + LOGE2L) )
- {
- mtherr( "coshl", OVERFLOW );
-#ifdef INFINITIES
- return( INFINITYL );
-#else
- return( MAXNUML );
-#endif
- }
-if( x >= (MAXLOGL - LOGE2L) )
- {
- y = expl(0.5L * x);
- y = (0.5L * y) * y;
- return(y);
- }
-y = expl(x);
-y = 0.5L * (y + 1.0L / y);
-return( y );
-}