summaryrefslogtreecommitdiff
path: root/sysdeps/alpha/fpu/s_rintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/alpha/fpu/s_rintf.c')
-rw-r--r--sysdeps/alpha/fpu/s_rintf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/alpha/fpu/s_rintf.c b/sysdeps/alpha/fpu/s_rintf.c
index 1400dfe8d7..0cc912d843 100644
--- a/sysdeps/alpha/fpu/s_rintf.c
+++ b/sysdeps/alpha/fpu/s_rintf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson.
@@ -17,11 +17,15 @@
<http://www.gnu.org/licenses/>. */
#include <math.h>
+#include <libm-alias-float.h>
float
__rintf (float x)
{
+ if (isnanf (x))
+ return x + x;
+
if (isless (fabsf (x), 16777216.0f)) /* 1 << FLT_MANT_DIG */
{
/* Note that Alpha S_Floating is stored in registers in a
@@ -44,4 +48,4 @@ __rintf (float x)
return x;
}
-weak_alias (__rintf, rintf)
+libm_alias_float (__rint, rint)