diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-05-19 18:40:25 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-05-19 18:40:25 +0000 |
commit | 3e694268750d51acc6a68b0ee7ded25a52902c20 (patch) | |
tree | dea529a863349fc82263de39b239742a00845031 /sysdeps/ieee754/flt-32 | |
parent | db62a9075305963281572cb990d1c766948bae7b (diff) | |
download | glibc-3e694268750d51acc6a68b0ee7ded25a52902c20.zip glibc-3e694268750d51acc6a68b0ee7ded25a52902c20.tar.gz glibc-3e694268750d51acc6a68b0ee7ded25a52902c20.tar.bz2 |
Fix nearbyint scheduling of arithmetic past fesetenv (bug 15490).
Diffstat (limited to 'sysdeps/ieee754/flt-32')
-rw-r--r-- | sysdeps/ieee754/flt-32/s_nearbyintf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/ieee754/flt-32/s_nearbyintf.c b/sysdeps/ieee754/flt-32/s_nearbyintf.c index 48debad..5aebefa 100644 --- a/sysdeps/ieee754/flt-32/s_nearbyintf.c +++ b/sysdeps/ieee754/flt-32/s_nearbyintf.c @@ -39,6 +39,7 @@ __nearbyintf(float x) libc_feholdexceptf (&env); w = TWO23[sx]+x; t = w-TWO23[sx]; + math_force_eval (t); libc_fesetenvf (&env); GET_FLOAT_WORD(i0,t); SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31)); @@ -51,6 +52,7 @@ __nearbyintf(float x) libc_feholdexceptf (&env); w = TWO23[sx]+x; t = w-TWO23[sx]; + math_force_eval (t); libc_fesetenvf (&env); return t; } |