diff options
Diffstat (limited to 'lib/msun/src/s_expm1.c')
-rw-r--r-- | lib/msun/src/s_expm1.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/msun/src/s_expm1.c b/lib/msun/src/s_expm1.c index 3de7bfb..5aa1917 100644 --- a/lib/msun/src/s_expm1.c +++ b/lib/msun/src/s_expm1.c @@ -108,6 +108,8 @@ __FBSDID("$FreeBSD$"); * to produce the hexadecimal values shown. */ +#include <float.h> + #include "math.h" #include "math_private.h" @@ -135,7 +137,6 @@ expm1(double x) GET_HIGH_WORD(hx,x); xsb = hx&0x80000000; /* sign bit of x */ - if(xsb==0) y=x; else y= -x; /* y = |x| */ hx &= 0x7fffffff; /* high word of |x| */ /* filter out huge and non-finite argument */ @@ -169,7 +170,7 @@ expm1(double x) hi = x - t*ln2_hi; /* t*ln2_hi is exact here */ lo = t*ln2_lo; } - x = hi - lo; + STRICT_ASSIGN(double, x, hi - lo); c = (hi-x)-lo; } else if(hx < 0x3c900000) { /* when |x|<2**-54, return x */ |