mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-08 18:19:08 +08:00
libm/math: ensure that expf(-huge) sets FE_UNDERFLOW exception
It was calling __math_uflow(0) instead of __math_uflowf(0), which resulted in no exception being set on machines with exception support for float but not double. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
291a4b22df
commit
cf3c0c19b3
@ -64,7 +64,7 @@ P5 = 4.1381369442e-08; /* 0x3331bb4c */
|
|||||||
if(sx > FLT_UWORD_LOG_MAX)
|
if(sx > FLT_UWORD_LOG_MAX)
|
||||||
return __math_oflowf(0); /* overflow */
|
return __math_oflowf(0); /* overflow */
|
||||||
if(sx < 0 && hx > FLT_UWORD_LOG_MIN)
|
if(sx < 0 && hx > FLT_UWORD_LOG_MIN)
|
||||||
return __math_uflow(0); /* underflow */
|
return __math_uflowf(0); /* underflow */
|
||||||
|
|
||||||
/* argument reduction */
|
/* argument reduction */
|
||||||
if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */
|
if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user