diff options
author | Keith Packard via Newlib <newlib@sourceware.org> | 2020-08-07 22:40:21 -0700 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2020-08-10 10:31:36 +0200 |
commit | 73b02710ecbea5ace2508527fbc4f939c87069cd (patch) | |
tree | 6fe74a7cafd2ef337147e2f46f03e26f9639caee /newlib/libm/math | |
parent | 225d376b70f92bbb68b57b928a29044ab3c30acf (diff) | |
download | newlib-73b02710ecbea5ace2508527fbc4f939c87069cd.zip newlib-73b02710ecbea5ace2508527fbc4f939c87069cd.tar.gz newlib-73b02710ecbea5ace2508527fbc4f939c87069cd.tar.bz2 |
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>
Diffstat (limited to 'newlib/libm/math')
-rw-r--r-- | newlib/libm/math/ef_exp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libm/math/ef_exp.c b/newlib/libm/math/ef_exp.c index 0cd0c00..d6e25bf 100644 --- a/newlib/libm/math/ef_exp.c +++ b/newlib/libm/math/ef_exp.c @@ -64,7 +64,7 @@ P5 = 4.1381369442e-08; /* 0x3331bb4c */ if(sx > FLT_UWORD_LOG_MAX) return __math_oflowf(0); /* overflow */ if(sx < 0 && hx > FLT_UWORD_LOG_MIN) - return __math_uflow(0); /* underflow */ + return __math_uflowf(0); /* underflow */ /* argument reduction */ if(hx > 0x3eb17218) { /* if |x| > 0.5 ln2 */ |