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/ldbl-128/s_nearbyintl.c | |
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/ldbl-128/s_nearbyintl.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-128/s_nearbyintl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_nearbyintl.c b/sysdeps/ieee754/ldbl-128/s_nearbyintl.c index d2afc10..2017c04 100644 --- a/sysdeps/ieee754/ldbl-128/s_nearbyintl.c +++ b/sysdeps/ieee754/ldbl-128/s_nearbyintl.c @@ -47,6 +47,7 @@ long double __nearbyintl(long double x) feholdexcept (&env); w = TWO112[sx]+x; t = w-TWO112[sx]; + math_force_eval (t); fesetenv (&env); GET_LDOUBLE_MSW64(i0,t); SET_LDOUBLE_MSW64(t,(i0&0x7fffffffffffffffLL)|(sx<<63)); @@ -59,6 +60,7 @@ long double __nearbyintl(long double x) feholdexcept (&env); w = TWO112[sx]+x; t = w-TWO112[sx]; + math_force_eval (t); fesetenv (&env); return t; } |