summary refs log tree commit diff
path: root/math/s_nan.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/s_nan.c')
-rw-r--r--math/s_nan.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/math/s_nan.c b/math/s_nan.c
index f4b30a26f5..a6f3006ba4 100644
--- a/math/s_nan.c
+++ b/math/s_nan.c
@@ -28,14 +28,7 @@
 double
 __nan (const char *tagp)
 {
-  if (tagp[0] != '\0')
-    {
-      char buf[6 + strlen (tagp)];
-      sprintf (buf, "NAN(%s)", tagp);
-      return strtod (buf, NULL);
-    }
-
-  return NAN;
+  return __strtod_nan (tagp, NULL, 0);
 }
 weak_alias (__nan, nan)
 #ifdef NO_LONG_DOUBLE