about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/s_lrint.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_lrint.c')
-rw-r--r--sysdeps/ieee754/dbl-64/s_lrint.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_lrint.c b/sysdeps/ieee754/dbl-64/s_lrint.c
index 9cce37f3cf..353d5f503b 100644
--- a/sysdeps/ieee754/dbl-64/s_lrint.c
+++ b/sysdeps/ieee754/dbl-64/s_lrint.c
@@ -34,7 +34,7 @@ __lrint (double x)
 {
   int32_t j0;
   u_int32_t i0, i1;
-  volatile double w;
+  double w;
   double t;
   long int result;
   int sx;
@@ -47,7 +47,7 @@ __lrint (double x)
 
   if (j0 < 20)
     {
-      w = two52[sx] + x;
+      w = math_narrow_eval (two52[sx] + x);
       t = w - two52[sx];
       EXTRACT_WORDS (i0, i1, t);
       j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
@@ -62,7 +62,7 @@ __lrint (double x)
 	result = ((long int) i0 << (j0 - 20)) | (i1 << (j0 - 52));
       else
 	{
-	  w = two52[sx] + x;
+	  w = math_narrow_eval (two52[sx] + x);
 	  t = w - two52[sx];
 	  EXTRACT_WORDS (i0, i1, t);
 	  j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;