[前][次][番号順一覧][スレッド一覧]

ruby-changes:38630

From: gogotanaka <ko1@a...>
Date: Mon, 1 Jun 2015 15:17:15 +0900 (JST)
Subject: [ruby-changes:38630] gogotanaka:r50711 (trunk): test/ruby/test_complex.rb: Add test for CMath.log2

gogotanaka	2015-06-01 15:16:53 +0900 (Mon, 01 Jun 2015)

  New Revision: 50711

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50711

  Log:
    test/ruby/test_complex.rb: Add test for CMath.log2

  Modified files:
    trunk/test/ruby/test_complex.rb
Index: test/ruby/test_complex.rb
===================================================================
--- test/ruby/test_complex.rb	(revision 50710)
+++ test/ruby/test_complex.rb	(revision 50711)
@@ -967,6 +967,10 @@ class Complex_Test < Test::Unit::TestCas https://github.com/ruby/ruby/blob/trunk/test/ruby/test_complex.rb#L967
       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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]