From 257071fc2038c8f093235e43df9766f1e741381f Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 8 Aug 2018 12:19:01 -0400 Subject: [PATCH] e_exp: One more compiler warning. --- src/libm/e_exp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libm/e_exp.c b/src/libm/e_exp.c index 84b190b595767..617a20198e990 100644 --- a/src/libm/e_exp.c +++ b/src/libm/e_exp.c @@ -117,7 +117,12 @@ double __ieee754_exp(double x) /* default IEEE double exp */ return x+x; /* NaN */ else return (xsb==0)? x:0.0; /* exp(+-inf)={inf,0} */ } - if(x > o_threshold) return huge*huge; /* overflow */ + #if 0 + if(x > o_threshold) return huge*huge; /* overflow */ + #else /* !!! FIXME: check this: "huge * huge" is a compiler warning, maybe they wanted +Inf? */ + if(x > o_threshold) return INFINITY; /* overflow */ + #endif + if(x < u_threshold) return twom1000*twom1000; /* underflow */ }