diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-04-21 12:26:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-04-21 12:26:08 +0000 |
commit | 71e0bb92d13af4f8aabb79689a3a7edb81b6680a (patch) | |
tree | 1cb8b3a6f9623e1714715ac5986c6ac339830f3f /numeric.c | |
parent | 3819849ac195b9034e0cb9f6101978adfc18b6f0 (diff) | |
download | ruby-71e0bb92d13af4f8aabb79689a3a7edb81b6680a.tar.gz |
* numeric.c (flo_is_finite_p): use finite() if available.
* win32/win32.h (isinf, isnan): define as macro.
[ruby-win32:00533]
* bcc32/Makefile.sub, win32/Makefile.sub: no longer use
missing/isinf.c, missing/isnan.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -758,9 +758,14 @@ flo_is_finite_p(num) { double value = RFLOAT(num)->value; +#if HAVE_FINITE + if (!finite(value)) + return Qfalse; +#else if (isinf(value) || isnan(value)) return Qfalse; - +#endif + return Qtrue; } |