HomeFreeBSD

Fix incorrect powf(3) result with x near 1 and |y| much larger than 1

Description

Fix incorrect powf(3) result with x near 1 and |y| much larger than 1

This adjusts the check to trigger overflow/underflow to a slightly lower
value.

Before: powf(9.999995e-01, -1.342177e+08) -> inf
After: powf(9.999995e-01, -1.342177e+08) -> 1.858724e+31

(cherry picked from commit 93fc67896550548f91b307dbe3053f11db5d4a8a)

Add test case for 93fc67896550 (incorrect powf(3) result)

This adds the test case to contrib/netbsd-tests/lib/libm/t_pow.c, as it
is currently the only place testing pow(3) and friends.

(cherry picked from commit 51af03328755c9095e94d20858a8d10acfe412ae)

Details

Provenance
Steve Kargl <sgk@troutmask.apl.washington.edu>Authored on Feb 8 2021, 7:45 PM
dimCommitted on Feb 15 2021, 6:10 PM
Parents
rG5357bd228fca: usleep(3): replace 'process' with 'calling thread'
Branches
Unknown
Tags
Unknown