diff options
| author | Bruce Evans <bde@FreeBSD.org> | 2008-01-19 21:37:14 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 2008-01-19 21:37:14 +0000 |
| commit | 684217d8896437b642fa8a6020bb5318b2c330ed (patch) | |
| tree | c3e748c0022c141866c1b2b93edc0bc911915c6e /lib/msun | |
| parent | fa7fdac72578705b19b445abcf8cee9f90ef2907 (diff) | |
Notes
Diffstat (limited to 'lib/msun')
| -rw-r--r-- | lib/msun/src/s_exp2.c | 2 | ||||
| -rw-r--r-- | lib/msun/src/s_exp2f.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/msun/src/s_exp2.c b/lib/msun/src/s_exp2.c index 464e39c7b8d8..56554f180737 100644 --- a/lib/msun/src/s_exp2.c +++ b/lib/msun/src/s_exp2.c @@ -364,7 +364,7 @@ exp2(double x) } /* Reduce x, computing z, i0, and k. */ - t = x + redux; + STRICT_ASSIGN(double, t, x + redux); GET_LOW_WORD(i0, t); i0 += TBLSIZE / 2; k = (i0 >> TBLBITS) << 20; diff --git a/lib/msun/src/s_exp2f.c b/lib/msun/src/s_exp2f.c index 0a6142ffb431..db8542cc633d 100644 --- a/lib/msun/src/s_exp2f.c +++ b/lib/msun/src/s_exp2f.c @@ -27,6 +27,8 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <float.h> + #include "math.h" #include "math_private.h" @@ -91,8 +93,7 @@ float exp2f(float x) { double tv; - float r, z; - volatile float t; /* prevent gcc from using too much precision */ + float r, t, z; uint32_t hx, hr, ix, i0; int32_t k; @@ -115,7 +116,7 @@ exp2f(float x) } /* Reduce x, computing z, i0, and k. */ - t = x + redux; + STRICT_ASSIGN(float, t, x + redux); GET_FLOAT_WORD(i0, t); i0 += TBLSIZE / 2; k = (i0 >> TBLBITS) << 23; |
