mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
8305152dc0
commit
900931cc7a
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue