X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fmath%2Facosh.c;h=15f51c6eb083a0d1e65c179c2d0cce397a088294;hp=a7c87e3cdde0e14b624791836d49e632786f6cf0;hb=be81f51030d90de8d5eb0b65dbdab3032d5cae23;hpb=b69f695acedd4ce2798ef9ea28d834ceccc789bd 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)); } }