From dc37d6dababaf1947d9395ba0610097821906791 Mon Sep 17 00:00:00 2001 From: gogotanaka Date: Mon, 16 Mar 2015 08:39:29 +0000 Subject: * math.c (math_log1, math_log2, math_log10): refactoring and tests for this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_math.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/ruby/test_math.rb') diff --git a/test/ruby/test_math.rb b/test/ruby/test_math.rb index a4237ecff2..674bb541e5 100644 --- a/test/ruby/test_math.rb +++ b/test/ruby/test_math.rb @@ -150,6 +150,7 @@ class TestMath < Test::Unit::TestCase check(1, Math.log(10, 10)) check(2, Math.log(100, 10)) check(Math.log(2.0 ** 64), Math.log(1 << 64)) + check(Math.log(2) * 1024.0, Math.log(2 ** 1024)) assert_nothing_raised { assert_infinity(Math.log(1.0/0)) } assert_nothing_raised { assert_infinity(-Math.log(+0.0)) } assert_nothing_raised { assert_infinity(-Math.log(-0.0)) } @@ -164,6 +165,7 @@ class TestMath < Test::Unit::TestCase check(1, Math.log2(2)) check(2, Math.log2(4)) check(Math.log2(2.0 ** 64), Math.log2(1 << 64)) + check(1024.0, Math.log2(2 ** 1024)) assert_nothing_raised { assert_infinity(Math.log2(1.0/0)) } assert_nothing_raised { assert_infinity(-Math.log2(+0.0)) } assert_nothing_raised { assert_infinity(-Math.log2(-0.0)) } @@ -175,6 +177,7 @@ class TestMath < Test::Unit::TestCase check(1, Math.log10(10)) check(2, Math.log10(100)) check(Math.log10(2.0 ** 64), Math.log10(1 << 64)) + check(Math.log10(2) * 1024, Math.log10(2 ** 1024)) assert_nothing_raised { assert_infinity(Math.log10(1.0/0)) } assert_nothing_raised { assert_infinity(-Math.log10(+0.0)) } assert_nothing_raised { assert_infinity(-Math.log10(-0.0)) } -- cgit v1.2.3