summaryrefslogtreecommitdiffstats
path: root/lib/libm/common_source/asinh.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libm/common_source/asinh.c')
-rw-r--r--lib/libm/common_source/asinh.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libm/common_source/asinh.c b/lib/libm/common_source/asinh.c
index 5db8d2d..1804145 100644
--- a/lib/libm/common_source/asinh.c
+++ b/lib/libm/common_source/asinh.c
@@ -49,16 +49,16 @@ static char sccsid[] = "@(#)asinh.c 8.1 (Berkeley) 6/4/93";
* log1p(x) ...return log(1+x)
*
* Method :
- * Based on
+ * Based on
* asinh(x) = sign(x) * log [ |x| + sqrt(x*x+1) ]
* we have
* asinh(x) := x if 1+x*x=1,
* := sign(x)*(log1p(x)+ln2)) if sqrt(1+x*x)=x, else
- * := sign(x)*log1p(|x| + |x|/(1/|x| + sqrt(1+(1/|x|)^2)) )
+ * := sign(x)*log1p(|x| + |x|/(1/|x| + sqrt(1+(1/|x|)^2)) )
*
* Accuracy:
* asinh(x) returns the exact inverse hyperbolic sine of x nearly rounded.
- * In a test run with 52,000 random arguments on a VAX, the maximum
+ * In a test run with 52,000 random arguments on a VAX, the maximum
* observed error was 1.58 ulps (units in the last place).
*
* Constants:
@@ -82,16 +82,16 @@ ic(ln2lo, 1.9082149292705877000E-10, -33, 1.A39EF35793C76)
double asinh(x)
double x;
-{
+{
double t,s;
const static double small=1.0E-10, /* fl(1+small*small) == 1 */
big =1.0E20, /* fl(1+big) == big */
- one =1.0 ;
+ one =1.0 ;
#if !defined(vax)&&!defined(tahoe)
if(x!=x) return(x); /* x is NaN */
#endif /* !defined(vax)&&!defined(tahoe) */
- if((t=copysign(x,one))>small)
+ if((t=copysign(x,one))>small)
if(t<big) {
s=one/t; return(copysign(log1p(t+t/(s+sqrt(one+s*s))),x)); }
else /* if |x| > big */
OpenPOWER on IntegriCloud