X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fmath%2Fsinh.c;h=0c67ba3947f980b9e4f8266424e9b1aa1c30adc9;hp=935879c5e0eceeae1dde49e3a53bd8e092ab16b4;hb=6f64505df37c41d7496612dffe86048765339a7a;hpb=b69f695acedd4ce2798ef9ea28d834ceccc789bd 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|) */