X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fsinh.c;h=a01951ae6fc4fdb4954de0b6f24323b230f6ae88;hb=4554f155dd23a65fcdfd39f1d5af8af55ba37694;hp=47e36bfa293a1dd41a3a4b1055aae1fcf8029868;hpb=5d5ab51862cbd010bdf52dc3b04b0967450bcd1a;p=musl diff --git a/src/math/sinh.c b/src/math/sinh.c index 47e36bfa..a01951ae 100644 --- a/src/math/sinh.c +++ b/src/math/sinh.c @@ -23,8 +23,8 @@ double sinh(double x) t = expm1(absx); if (w < 0x3ff00000) { if (w < 0x3ff00000 - (26<<20)) - /* note: inexact is raised by expm1 */ - /* note: this branch avoids underflow */ + /* note: inexact and underflow are raised by expm1 */ + /* note: this branch avoids spurious underflow */ return x; return h*(2*t - t*t/(t+1)); } @@ -34,6 +34,6 @@ double sinh(double x) /* |x| > log(DBL_MAX) or nan */ /* note: the result is stored to handle overflow */ - t = 2*h*__expo2(absx); + t = __expo2(absx, 2*h); return t; }