summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index 5a4d4930ac7..21aecf73af3 100644
--- a/numeric.c
+++ b/numeric.c
@@ -186,7 +186,9 @@ flo_to_s(flt)
char buf[24];
snprintf(buf, 24, "%.10g", RFLOAT(flt)->value);
- if (strchr(buf, '.') == 0 && strcmp(buf, "Inf") != 0) {
+ if (strchr(buf, '.') == 0 &&
+ strcmp(buf, "Inf") != 0 &&
+ strcmp(buf, "NaN") != 0) {
int len = strlen(buf);
char *ind = strchr(buf, 'e');