diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-03-15 23:12:44 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-03-25 16:21:50 +0900 |
| commit | ce675615110e62d1e4e55b197dcb37a62930629d (patch) | |
| tree | bc667693c5960499939ac3c3d39ab1d502b90aa8 /test | |
| parent | 3e5dd40a5c46a6789f8bb773caf9f1496be10532 (diff) | |
| download | mruby-ce675615110e62d1e4e55b197dcb37a62930629d.tar.gz mruby-ce675615110e62d1e4e55b197dcb37a62930629d.zip | |
Avoid infinite binary floating numbers in `float`.
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/float.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/t/float.rb b/test/t/float.rb index 910d7b1d5..b919c6e3a 100644 --- a/test/t/float.rb +++ b/test/t/float.rb @@ -216,10 +216,10 @@ assert('Float#to_s') do assert_equal("-0.0", -0.0.to_s) assert_equal("-3.25", -3.25.to_s) assert_equal("50.0", 50.0.to_s) - assert_equal("0.00025", 0.00025.to_s) - assert_equal("-0.00025", -0.00025.to_s) - assert_equal("2.5e-05", 0.000025.to_s) - assert_equal("-2.5e-05", -0.000025.to_s) + assert_equal("0.00125", 0.00125.to_s) + assert_equal("-0.00125", -0.00125.to_s) + assert_equal("1.5e-05", 0.000015.to_s) + assert_equal("-1.5e-05", -0.000015.to_s) assert_equal("1.0e+20", 1e20.to_s) assert_equal("-1.0e+20", -1e20.to_s) assert_equal("1.0e+16", 10000000000000000.0.to_s) |
