diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-03-19 22:07:43 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-03-19 22:07:43 -0400 |
commit | 97721a5508415a2f10eb068e022093811c9ff8be (patch) | |
tree | 88e9ce153895ad949576fa7ce1eeee4b02286479 /src/math/sinh.c | |
parent | acb744921b73f5a73803e533e5e4a4896d164a26 (diff) | |
parent | 0cbb65479147ecdaa664e88cc2a5a925f3de502f (diff) | |
download | musl-97721a5508415a2f10eb068e022093811c9ff8be.tar.gz musl-97721a5508415a2f10eb068e022093811c9ff8be.tar.bz2 musl-97721a5508415a2f10eb068e022093811c9ff8be.tar.xz musl-97721a5508415a2f10eb068e022093811c9ff8be.zip |
Merge remote branch 'nsz/master'
Diffstat (limited to 'src/math/sinh.c')
-rw-r--r-- | src/math/sinh.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/math/sinh.c b/src/math/sinh.c index 935879c5..0c67ba39 100644 --- a/src/math/sinh.c +++ b/src/math/sinh.c @@ -29,7 +29,7 @@ #include "libm.h" -static const double one = 1.0, huge = 1.0e307; +static const double huge = 1.0e307; double sinh(double x) { @@ -50,12 +50,12 @@ double sinh(double x) if (ix < 0x40360000) { /* |x|<22 */ if (ix < 0x3e300000) /* |x|<2**-28 */ /* raise inexact, return x */ - if (huge+x > one) + if (huge+x > 1.0) return x; t = expm1(fabs(x)); if (ix < 0x3ff00000) - return h*(2.0*t - t*t/(t+one)); - return h*(t + t/(t+one)); + return h*(2.0*t - t*t/(t+1.0)); + return h*(t + t/(t+1.0)); } /* |x| in [22, log(maxdouble)] return 0.5*exp(|x|) */ |