diff options
| author | Steve Kargl <kargl@FreeBSD.org> | 2012-09-23 18:32:03 +0000 |
|---|---|---|
| committer | Steve Kargl <kargl@FreeBSD.org> | 2012-09-23 18:32:03 +0000 |
| commit | dba466c34451153f8d8661bf76f1fab3e4cc1bd7 (patch) | |
| tree | 032cf1f1caf6552d658d3aa5de3164c10686d17a /lib/msun | |
| parent | 724c1ee29f9175306c5c8f3a5c8688adaca52306 (diff) | |
Notes
Diffstat (limited to 'lib/msun')
| -rw-r--r-- | lib/msun/ld128/s_expl.c | 13 | ||||
| -rw-r--r-- | lib/msun/ld80/s_expl.c | 2 |
2 files changed, 6 insertions, 9 deletions
diff --git a/lib/msun/ld128/s_expl.c b/lib/msun/ld128/s_expl.c index c8b7550a282dc..5052c3afca677 100644 --- a/lib/msun/ld128/s_expl.c +++ b/lib/msun/ld128/s_expl.c @@ -211,19 +211,16 @@ expl(long double x) ix = hx & 0x7fff; if (ix >= BIAS + 13) { /* |x| >= 8192 or x is NaN */ if (ix == BIAS + LDBL_MAX_EXP) { - if (u.xbits.manh != 0 - || u.xbits.manl != 0 - || (hx & 0x8000) == 0) - return (x + x); /* x is NaN or +Inf */ - else - return (0.0); /* x is -Inf */ + if (hx & 0x8000 && u.xbits.manh == 0 && + u.xbits.manl == 0) + return (0.0L); /* x is -Inf */ + return (x + x); /* x is +Inf or NaN */ } if (x > o_threshold) return (huge * huge); if (x < u_threshold) return (tiny * tiny); - } else if (ix <= BIAS - 115) { /* |x| < 0x1p-33 */ - /* includes pseudo-denormals */ + } else if (ix < BIAS - 115) { /* |x| < 0x1p-115 */ if (huge + x > 1.0L) /* trigger inexact iff x != 0 */ return (1.0L + x); } diff --git a/lib/msun/ld80/s_expl.c b/lib/msun/ld80/s_expl.c index b9cf4aee43444..dfd49e5f7cdb4 100644 --- a/lib/msun/ld80/s_expl.c +++ b/lib/msun/ld80/s_expl.c @@ -249,7 +249,7 @@ expl(long double x) return (huge * huge); if (x < u_threshold.e) return (tiny * tiny); - } else if (ix <= BIAS - 34) { /* |x| < 0x1p-33 */ + } else if (ix < BIAS - 66) { /* |x| < 0x1p-66 */ /* includes pseudo-denormals */ if (huge + x > 1.0L) /* trigger inexact iff x != 0 */ return (1.0L + x); |
