summaryrefslogtreecommitdiff
path: root/libm/float/asinhf.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/float/asinhf.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/float/asinhf.c')
-rw-r--r--libm/float/asinhf.c88
1 files changed, 0 insertions, 88 deletions
diff --git a/libm/float/asinhf.c b/libm/float/asinhf.c
deleted file mode 100644
index d3fbe10a7..000000000
--- a/libm/float/asinhf.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* asinhf.c
- *
- * Inverse hyperbolic sine
- *
- *
- *
- * SYNOPSIS:
- *
- * float x, y, asinhf();
- *
- * y = asinhf( x );
- *
- *
- *
- * DESCRIPTION:
- *
- * Returns inverse hyperbolic sine of argument.
- *
- * If |x| < 0.5, the function is approximated by a rational
- * form x + x**3 P(x)/Q(x). Otherwise,
- *
- * asinh(x) = log( x + sqrt(1 + x*x) ).
- *
- *
- *
- * ACCURACY:
- *
- * Relative error:
- * arithmetic domain # trials peak rms
- * IEEE -3,3 100000 2.4e-7 4.1e-8
- *
- */
-
-/* asinh.c */
-
-/*
-Cephes Math Library Release 2.2: June, 1992
-Copyright 1984, 1987, 1988, 1992 by Stephen L. Moshier
-Direct inquiries to 30 Frost Street, Cambridge, MA 02140
-*/
-
-/* Single precision inverse hyperbolic sine
- * test interval: [-0.5, +0.5]
- * trials: 10000
- * peak relative error: 8.8e-8
- * rms relative error: 3.2e-8
- */
-#include <math.h>
-extern float LOGE2F;
-
-float logf( float );
-float sqrtf( float );
-
-float asinhf( float xx )
-{
-float x, z;
-
-if( xx < 0 )
- x = -xx;
-else
- x = xx;
-
-if( x > 1500.0 )
- {
- z = logf(x) + LOGE2F;
- goto done;
- }
-z = x * x;
-if( x < 0.5 )
- {
- z =
- ((( 2.0122003309E-2 * z
- - 4.2699340972E-2) * z
- + 7.4847586088E-2) * z
- - 1.6666288134E-1) * z * x
- + x;
- }
-else
- {
- z = sqrtf( z + 1.0 );
- z = logf( x + z );
- }
-done:
-if( xx < 0 )
- z = -z;
-return( z );
-}
-