about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/dbl-64')
-rw-r--r--sysdeps/ieee754/dbl-64/e_atan2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_atan2.c b/sysdeps/ieee754/dbl-64/e_atan2.c
index a03ce3e4a6..0c2902855e 100644
--- a/sysdeps/ieee754/dbl-64/e_atan2.c
+++ b/sysdeps/ieee754/dbl-64/e_atan2.c
@@ -41,6 +41,7 @@
 #include "MathLib.h"
 #include "uatan.tbl"
 #include "atnat2.h"
+#include <fenv.h>
 #include <float.h>
 #include <math.h>
 #include <math_private.h>
@@ -192,6 +193,7 @@ __ieee754_atan2 (double y, double x)
 	return mhpi.d;
     }
 
+  SET_RESTORE_ROUND (FE_TONEAREST);
   /* either x/y or y/x is very close to zero */
   ax = (x < 0) ? -x : x;
   ay = (y < 0) ? -y : y;