diff options
author | gogotanaka <gogotanaka@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-01 06:16:53 +0000 |
---|---|---|
committer | gogotanaka <gogotanaka@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-01 06:16:53 +0000 |
commit | 900931cc7afc6d77bcea72fc011ca6b16ae2d490 (patch) | |
tree | 677e4c000b16c33871841257b9d4530ca2deb5e0 /test | |
parent | 8305152dc00934a6fc79f30aa0ad6e34bb01a332 (diff) | |
download | ruby-900931cc7afc6d77bcea72fc011ca6b16ae2d490.tar.gz |
test/ruby/test_complex.rb: Add test for CMath.log2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_complex.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb index 3205329a87..5a6d90333e 100644 --- a/test/ruby/test_complex.rb +++ b/test/ruby/test_complex.rb @@ -967,6 +967,10 @@ class Complex_Test < Test::Unit::TestCase assert_in_delta(1.092, c.real, 0.001) assert_in_delta(-0.420, c.imag, 0.001) + c = CMath.log2(Complex(1, 2)) + assert_in_delta(1.161, c.real, 0.001) + assert_in_delta(1.597, c.imag, 0.001) + c = CMath.log10(Complex(1, 2)) assert_in_delta(0.349, c.real, 0.001) assert_in_delta(0.480, c.imag, 0.001) |