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));
}
/* |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;
}