aboutsummaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-19 01:45:36 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-19 01:45:36 +0000
commit3ca0948f68d1055cd980992dcb68deced0f4d704 (patch)
tree961c2602e81c6dc5f73e46a3a2d61565c4da16d8 /bignum.c
parent09b4d6e8cd50dca07997d40b7e04d6652a9a4d43 (diff)
downloadruby-3ca0948f68d1055cd980992dcb68deced0f4d704.tar.gz
INFINITY is float. That of double is HUGE_VAL.
It seems HUGE_VAL is already used. Why not eliminate INTINITY. NAN is also float. That of double is called nan(). This is also fixed. Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 40d5d0e224..94aabf6a3e 100644
--- a/bignum.c
+++ b/bignum.c
@@ -6130,7 +6130,7 @@ big_fdiv(VALUE x, VALUE y, long ey)
#if SIZEOF_LONG > SIZEOF_INT
{
/* Visual C++ can't be here */
- if (l > INT_MAX) return INFINITY;
+ if (l > INT_MAX) return HUGE_VAL;
if (l < INT_MIN) return 0.0;
}
#endif