about summary refs log tree commit diff
path: root/sysdeps/alpha/fpu/s_rint.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/alpha/fpu/s_rint.c')
-rw-r--r--sysdeps/alpha/fpu/s_rint.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/alpha/fpu/s_rint.c b/sysdeps/alpha/fpu/s_rint.c
index f33fe72c11..259348afc0 100644
--- a/sysdeps/alpha/fpu/s_rint.c
+++ b/sysdeps/alpha/fpu/s_rint.c
@@ -23,6 +23,9 @@
 double
 __rint (double x)
 {
+  if (isnan (x))
+    return x + x;
+
   if (isless (fabs (x), 9007199254740992.0))	/* 1 << DBL_MANT_DIG */
     {
       double tmp1, new_x;