about summary refs log tree commit diff
path: root/src/math/asinh.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-03-19 22:07:43 -0400
committerRich Felker <dalias@aerifal.cx>2012-03-19 22:07:43 -0400
commit97721a5508415a2f10eb068e022093811c9ff8be (patch)
tree88e9ce153895ad949576fa7ce1eeee4b02286479 /src/math/asinh.c
parentacb744921b73f5a73803e533e5e4a4896d164a26 (diff)
parent0cbb65479147ecdaa664e88cc2a5a925f3de502f (diff)
downloadmusl-97721a5508415a2f10eb068e022093811c9ff8be.tar.gz
musl-97721a5508415a2f10eb068e022093811c9ff8be.tar.xz
musl-97721a5508415a2f10eb068e022093811c9ff8be.zip
Merge remote branch 'nsz/master'
Diffstat (limited to 'src/math/asinh.c')
-rw-r--r--src/math/asinh.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/math/asinh.c b/src/math/asinh.c
index 92aa9446..11bbd71a 100644
--- a/src/math/asinh.c
+++ b/src/math/asinh.c
@@ -23,7 +23,6 @@
 #include "libm.h"
 
 static const double
-one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
 ln2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */
 huge= 1.00000000000000000000e+300;
 
@@ -38,17 +37,17 @@ double asinh(double x)
 		return x+x;
 	if (ix < 0x3e300000) {  /* |x| < 2**-28 */
 		/* return x inexact except 0 */
-		if (huge+x > one)
+		if (huge+x > 1.0)
 			return x;
 	}
 	if (ix > 0x41b00000) {  /* |x| > 2**28 */
 		w = log(fabs(x)) + ln2;
 	} else if (ix > 0x40000000) {  /* 2**28 > |x| > 2.0 */
 		t = fabs(x);
-		w = log(2.0*t + one/(sqrt(x*x+one)+t));
+		w = log(2.0*t + 1.0/(sqrt(x*x+1.0)+t));
 	} else {                /* 2.0 > |x| > 2**-28 */
 		t = x*x;
-		w =log1p(fabs(x) + t/(one+sqrt(one+t)));
+		w =log1p(fabs(x) + t/(1.0+sqrt(1.0+t)));
 	}
 	if (hx > 0)
 		return w;