aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_math.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_math.rb b/test/ruby/test_math.rb
index 60fc591a65..67f5e86e42 100644
--- a/test/ruby/test_math.rb
+++ b/test/ruby/test_math.rb
@@ -2,7 +2,8 @@ require 'test/unit'
class TestMath < Test::Unit::TestCase
def check(a, b)
- assert_in_delta(a, b, Float::EPSILON * 4)
+ err = [Float::EPSILON * 4, [a.abs, b.abs].max * Float::EPSILON * 256].max
+ assert_in_delta(a, b, err)
end
def test_atan2