aboutsummaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorAndoni Arregi <andoni.arregui@gtd-gmbh.de>2023-04-12 17:34:43 +0200
committerJeff Johnston <jjohnstn@redhat.com>2023-04-13 13:33:46 -0400
commite5a36e6af7c52b70fbc8c11a888220d8579e0275 (patch)
tree2f7f136795d3097586392e0dcb0d79c82226da5e /newlib
parent5a961061de7d70bd3568270185c3189e20958e68 (diff)
downloadnewlib-e5a36e6af7c52b70fbc8c11a888220d8579e0275.zip
newlib-e5a36e6af7c52b70fbc8c11a888220d8579e0275.tar.gz
newlib-e5a36e6af7c52b70fbc8c11a888220d8579e0275.tar.bz2
Fix x close to 1, y between 2^31 and 2^64
E.g. known errors: x = 0x1.000002c5e2e99p+0, y = 0x1.c9eee35374af6p+31 had an error of 639 ULP and is now correctly rounded. x = 0x1.fffffd2e3e669p-1, y = 0x1.344c9823eb66cp+32 had an error of 428 ULP and is now correctly rounded.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libm/math/e_pow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/newlib/libm/math/e_pow.c b/newlib/libm/math/e_pow.c
index f02f76d..f24a98f 100644
--- a/newlib/libm/math/e_pow.c
+++ b/newlib/libm/math/e_pow.c
@@ -196,8 +196,8 @@ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
}
/* |y| is huge */
- if(iy>0x41e00000) { /* if |y| > 2**31 */
- if(iy>0x43f00000){ /* if |y| > 2**64, must o/uflow and y is an even integer */
+ if(iy>0x42000000) { /* if |y| > ~2**33 (does not regard mantissa) */
+ if(iy>0x43f00000){ /* if |y| > ~2**64, must o/uflow and y is an even integer */
if(ix<=0x3fefffff) return (hy<0)? __math_oflow(0):__math_uflow(0);
if(ix>=0x3ff00000) return (hy>0)? __math_oflow(0):__math_uflow(0);
}