summaryrefslogtreecommitdiff
path: root/src/math/acoshl.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/acoshl.c
parentacb744921b73f5a73803e533e5e4a4896d164a26 (diff)
parent0cbb65479147ecdaa664e88cc2a5a925f3de502f (diff)
downloadmusl-97721a5508415a2f10eb068e022093811c9ff8be.tar.gz
Merge remote branch 'nsz/master'
Diffstat (limited to 'src/math/acoshl.c')
-rw-r--r--src/math/acoshl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/math/acoshl.c b/src/math/acoshl.c
index d8310a73..a4024516 100644
--- a/src/math/acoshl.c
+++ b/src/math/acoshl.c
@@ -32,7 +32,6 @@ long double acoshl(long double x)
}
#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
static const long double
-one = 1.0,
ln2 = 6.931471805599453094287e-01L; /* 0x3FFE, 0xB17217F7, 0xD1CF79AC */
long double acoshl(long double x)
@@ -51,10 +50,10 @@ long double acoshl(long double x)
return 0.0; /* acosh(1) = 0 */
} else if (se > 0x4000) { /* x > 2 */
t = x*x;
- return logl(2.0*x - one/(x + sqrtl(t - one)));
+ return logl(2.0*x - 1.0/(x + sqrtl(t - 1.0)));
}
/* 1 < x <= 2 */
- t = x - one;
+ t = x - 1.0;
return log1pl(t + sqrtl(2.0*t + t*t));
}
#endif