diff options
Diffstat (limited to 'newlib/libm/math/ef_exp.c')
-rw-r--r-- | newlib/libm/math/ef_exp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libm/math/ef_exp.c b/newlib/libm/math/ef_exp.c index 6824f991a..19c570cfd 100644 --- a/newlib/libm/math/ef_exp.c +++ b/newlib/libm/math/ef_exp.c @@ -47,7 +47,7 @@ P5 = 4.1381369442e-08; /* 0x3331bb4c */ #endif { float y,hi,lo,c,t; - __int32_t k = 0,xsb,sx; + __int32_t k,xsb,sx; __uint32_t hx; GET_FLOAT_WORD(sx,x); @@ -79,6 +79,7 @@ P5 = 4.1381369442e-08; /* 0x3331bb4c */ else if(hx < 0x31800000) { /* when |x|<2**-28 */ if(huge+x>one) return one+x;/* trigger inexact */ } + else k = 0; /* x is now in primary range */ t = x*x; |