diff options
author | Jeremy Evans <[email protected]> | 2021-04-28 13:35:22 -0700 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2021-05-08 14:45:30 -0700 |
commit | 406ae7fb03640e11e200382ef61cd450b952b7aa (patch) | |
tree | 0eb0079a16584ef1157691ebc0d3e408ead866dc /test/ruby/test_math.rb | |
parent | b7fec2e3e52e29329c0b1539d30ae0951ad6a891 (diff) |
Fix Math.cbrt(0.0) on glibc
This should return 0, but on glibc it returned NaN.
Fixes [Bug #17804]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4425
Diffstat (limited to 'test/ruby/test_math.rb')
-rw-r--r-- | test/ruby/test_math.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_math.rb b/test/ruby/test_math.rb index 5cc12bcfeb..6c2b25787f 100644 --- a/test/ruby/test_math.rb +++ b/test/ruby/test_math.rb @@ -201,6 +201,7 @@ class TestMath < Test::Unit::TestCase check(-2, Math.cbrt(-8)) check(3, Math.cbrt(27)) check(-0.1, Math.cbrt(-0.001)) + check(0.0, Math.cbrt(0.0)) assert_nothing_raised { assert_infinity(Math.cbrt(1.0/0)) } assert_operator(Math.cbrt(1.0 - Float::EPSILON), :<=, 1.0) end |