diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-02-03 09:48:00 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-02-03 09:48:00 +0000 |
commit | 06d4e3b42d836b762c29cdc9dc7181caf14dcdec (patch) | |
tree | 4c85b1a55d024c59143e193b17e2444cb6873c6e /numeric.c | |
parent | 99839272a3cf1dfe69bd3bad26d96a915b905ef1 (diff) |
990203
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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'); |