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/dbl-64/s_nearbyint.c | |
parent | db62a9075305963281572cb990d1c766948bae7b (diff) | |
download | glibc-3e694268750d51acc6a68b0ee7ded25a52902c20.tar.gz glibc-3e694268750d51acc6a68b0ee7ded25a52902c20.tar.xz glibc-3e694268750d51acc6a68b0ee7ded25a52902c20.zip |
Fix nearbyint scheduling of arithmetic past fesetenv (bug 15490).
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_nearbyint.c')
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_nearbyint.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_nearbyint.c b/sysdeps/ieee754/dbl-64/s_nearbyint.c index eb40c298bb..5017f471d2 100644 --- a/sysdeps/ieee754/dbl-64/s_nearbyint.c +++ b/sysdeps/ieee754/dbl-64/s_nearbyint.c @@ -47,6 +47,7 @@ double __nearbyint(double x) libc_feholdexcept (&env); w = TWO52[sx]+x; t = w-TWO52[sx]; + math_force_eval (t); libc_fesetenv (&env); GET_HIGH_WORD(i0,t); SET_HIGH_WORD(t,(i0&0x7fffffff)|(sx<<31)); @@ -59,6 +60,7 @@ double __nearbyint(double x) libc_feholdexcept (&env); w = TWO52[sx]+x; t = w-TWO52[sx]; + math_force_eval (t); libc_fesetenv (&env); return t; } |