diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-22 23:07:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-03-22 23:07:36 +0000 |
commit | 9b66922d7f7a231724090de9a8037f4e944b1764 (patch) | |
tree | 4c3a619f3620aff83ff1db7496bd5fa995984bc1 /test/ruby/test_float.rb | |
parent | 24055b89c8fdf7de36ae6d613d18a65ed446ce59 (diff) | |
download | ruby-9b66922d7f7a231724090de9a8037f4e944b1764.tar.gz |
* numeric.c (flo_round): fix inaccurate results.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_float.rb')
-rw-r--r-- | test/ruby/test_float.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index 85faf63355..2e879bdd2f 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -320,6 +320,8 @@ class TestFloat < Test::Unit::TestCase assert_equal(1.110, 1.111.round(2)) assert_equal(11110.0, 11111.1.round(-1)) assert_equal(11100.0, 11111.1.round(-2)) + + assert_equal(10**300, 1.1e300.round(-300)) end VS = [ |