summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/flt-32/s_nearbyintf.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:01:57 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:01:57 +0000
commitcab56836b146bc129f1ad43f0393d95a9deca63a (patch)
tree4f4e655319bbac78fca170da05275c127429b460 /sysdeps/ieee754/flt-32/s_nearbyintf.c
parent04ac1241a4cd004872282c2c82ec37fa33925292 (diff)
parent82dd75a7f436a19047325d62182590c9f9e23a78 (diff)
Merge branch 't/tls' into refs/top-bases/t/tls-threadvar
Diffstat (limited to 'sysdeps/ieee754/flt-32/s_nearbyintf.c')
-rw-r--r--sysdeps/ieee754/flt-32/s_nearbyintf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/ieee754/flt-32/s_nearbyintf.c b/sysdeps/ieee754/flt-32/s_nearbyintf.c
index 5aebefafcf..4dfe491f27 100644
--- a/sysdeps/ieee754/flt-32/s_nearbyintf.c
+++ b/sysdeps/ieee754/flt-32/s_nearbyintf.c
@@ -17,7 +17,9 @@
#include <fenv.h>
#include <math.h>
+#include <math-barriers.h>
#include <math_private.h>
+#include <libm-alias-float.h>
static const float
TWO23[2]={
@@ -37,7 +39,7 @@ __nearbyintf(float x)
if(j0<23) {
if(j0<0) {
libc_feholdexceptf (&env);
- w = TWO23[sx]+x;
+ w = TWO23[sx] + math_opt_barrier (x);
t = w-TWO23[sx];
math_force_eval (t);
libc_fesetenvf (&env);
@@ -50,10 +52,10 @@ __nearbyintf(float x)
else return x; /* x is integral */
}
libc_feholdexceptf (&env);
- w = TWO23[sx]+x;
+ w = TWO23[sx] + math_opt_barrier (x);
t = w-TWO23[sx];
math_force_eval (t);
libc_fesetenvf (&env);
return t;
}
-weak_alias (__nearbyintf, nearbyintf)
+libm_alias_float (__nearbyint, nearbyint)