mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Make pow() conform to standard definition
This commit is contained in:
parent
754974faaa
commit
8af91bcbe7
15 changed files with 253 additions and 85 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue