X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fmath%2Fsinhf.c;h=b8d8822481a1246c0a2088f5302ab34a4693e25c;hp=fd11b8496767438f0b92b12fce51501025a34ef1;hb=be81f51030d90de8d5eb0b65dbdab3032d5cae23;hpb=8d0a6f7a1c47b280647f292e6864b85b72c71f2e diff --git a/src/math/sinhf.c b/src/math/sinhf.c index fd11b849..b8d88224 100644 --- a/src/math/sinhf.c +++ b/src/math/sinhf.c @@ -15,7 +15,7 @@ #include "libm.h" -static const float one = 1.0, huge = 1.0e37; +static const float huge = 1.0e37; float sinhf(float x) { @@ -36,12 +36,12 @@ float sinhf(float x) if (ix < 0x41100000) { /* |x|<9 */ if (ix < 0x39800000) /* |x|<2**-12 */ /* raise inexact, return x */ - if (huge+x > one) + if (huge+x > 1.0f) return x; t = expm1f(fabsf(x)); if (ix < 0x3f800000) - return h*(2.0f*t - t*t/(t+one)); - return h*(t + t/(t+one)); + return h*(2.0f*t - t*t/(t+1.0f)); + return h*(t + t/(t+1.0f)); } /* |x| in [9, logf(maxfloat)] return 0.5*exp(|x|) */