Make pow() conform to standard definition

This commit is contained in:
Justine Tunney 2021-03-03 09:05:21 -08:00
parent 754974faaa
commit 8af91bcbe7
15 changed files with 253 additions and 85 deletions

View file

@ -171,7 +171,8 @@ static long double fyl2xp1(long double x, long double y) {
}
static long double fscale(long double significand, long double exponent) {
return scalbl(trunc(significand), exponent);
if (isunordered(significand, exponent)) return NAN;
return ldexp(significand, exponent);
}
static long double x87remainder(long double x, long double y, uint32_t *sw,