about summary refs log tree commit diff
path: root/src/math/acosh.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/acosh.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/acosh.c')
-rw-r--r--src/math/acosh.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/math/acosh.c b/src/math/acosh.c
index a7c87e3c..15f51c6e 100644
--- a/src/math/acosh.c
+++ b/src/math/acosh.c
@@ -27,7 +27,6 @@
 #include "libm.h"
 
 static const double
-one = 1.0,
 ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
 
 double acosh(double x)
@@ -47,9 +46,9 @@ double acosh(double x)
 		return 0.0;            /* acosh(1) = 0 */
 	} else if (hx > 0x40000000) {  /* 2**28 > x > 2 */
 		t = x*x;
-		return log(2.0*x - one/(x+sqrt(t-one)));
+		return log(2.0*x - 1.0/(x+sqrt(t-1.0)));
 	} else {                /* 1 < x < 2 */
-		t = x-one;
+		t = x-1.0;
 		return log1p(t + sqrt(2.0*t+t*t));
 	}
 }