aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_math.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-06 14:01:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-06 14:01:43 +0000
commitc995315153f7403636ec0d6119b7885668b32039 (patch)
treef73f0aee5ae6ff2b100f76df7f2049014bf2bf98 /test/ruby/test_math.rb
parent439e50789b2b49676c5108894d324c5d1ccebf1f (diff)
downloadruby-c995315153f7403636ec0d6119b7885668b32039.tar.gz
math.c: adjust cbrt
* math.c (math_cbrt): refine the approximation result on boundary values by an iteration of Newton-Raphson method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_math.rb')
-rw-r--r--test/ruby/test_math.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_math.rb b/test/ruby/test_math.rb
index f226287442..5cc12bcfeb 100644
--- a/test/ruby/test_math.rb
+++ b/test/ruby/test_math.rb
@@ -202,6 +202,7 @@ class TestMath < Test::Unit::TestCase
check(3, Math.cbrt(27))
check(-0.1, Math.cbrt(-0.001))
assert_nothing_raised { assert_infinity(Math.cbrt(1.0/0)) }
+ assert_operator(Math.cbrt(1.0 - Float::EPSILON), :<=, 1.0)
end
def test_frexp