about summary refs log tree commit diff
path: root/sysdeps/libm-ieee754/s_nan.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/libm-ieee754/s_nan.c')
-rw-r--r--sysdeps/libm-ieee754/s_nan.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sysdeps/libm-ieee754/s_nan.c b/sysdeps/libm-ieee754/s_nan.c
index 1d2319cbd8..ff3b26855f 100644
--- a/sysdeps/libm-ieee754/s_nan.c
+++ b/sysdeps/libm-ieee754/s_nan.c
@@ -28,9 +28,6 @@
 double
 __nan (const char *tagp)
 {
-  static const union ieee754_double nan_value =
-  { ieee: { mantissa1: 0, mantissa0: 0x80000, exponent: 0x7ff, negative: 0 } };
-
   if (tagp[0] != '\0')
     {
       char buf[6 + strlen (tagp)];
@@ -38,6 +35,10 @@ __nan (const char *tagp)
       return strtod (buf, NULL);
     }
 
-  return nan_value.d;
+  return NAN;
 }
 weak_alias (__nan, nan)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__nan, __nanl)
+weak_alias (__nan, nanl)
+#endif