diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-21 09:15:52 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-21 09:15:52 +0000 |
commit | 745dcf0915a0de05c1f4b8d167ce7bf8c214dfc2 (patch) | |
tree | b1a7ebaaa4a776cf68afb5b17ef4430085a11a43 /bignum.c | |
parent | 8eb441fda64f083b7a3105347384c89c42899e45 (diff) |
merges r23695 and r23698 from trunk into ruby_1_9_1.
--
* bignum.c (rb_big2db): (-Float::MAX.to_i*2).to_f should return
-HUGE_VAL (-Infinity).
--
avoid signbit() and adjust indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1213,7 +1213,10 @@ rb_big2dbl(VALUE x) if (isinf(d)) { rb_warning("Bignum out of Float range"); - d = HUGE_VAL; + if (d < 0.0) + d = -HUGE_VAL; + else + d = HUGE_VAL; } return d; } |