mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/test_cmath.rb (TestCMath#test_trigonometric_functions): should
not compare float values (in complex values) by `==`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f0fd305528
commit
b12540e1eb
2 changed files with 11 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Jun 11 13:17:34 2015 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* test/test_cmath.rb (TestCMath#test_trigonometric_functions): should
|
||||
not compare float values (in complex values) by `==`.
|
||||
|
||||
Thu Jun 11 08:52:01 2015 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* method.h: embed rb_method_entry_t::attr::flags (5 bits) into
|
||||
|
|
|
@ -23,13 +23,13 @@ class TestCMath < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_trigonometric_functions
|
||||
assert_equal CMath.sinh(2).i, CMath.sin(2i)
|
||||
assert_equal CMath.cosh(2), CMath.cos(2i)
|
||||
assert_equal CMath.tanh(2).i, CMath.tan(2i)
|
||||
assert_in_delta CMath.sinh(2).i, CMath.sin(2i)
|
||||
assert_in_delta CMath.cosh(2), CMath.cos(2i)
|
||||
assert_in_delta CMath.tanh(2).i, CMath.tan(2i)
|
||||
|
||||
assert_equal CMath.sin(2).i, CMath.sinh(2i)
|
||||
assert_equal CMath.cos(2), CMath.cosh(2i)
|
||||
assert_equal CMath.tan(2).i, CMath.tanh(2i)
|
||||
assert_in_delta CMath.sin(2).i, CMath.sinh(2i)
|
||||
assert_in_delta CMath.cos(2), CMath.cosh(2i)
|
||||
assert_in_delta CMath.tan(2).i, CMath.tanh(2i)
|
||||
|
||||
assert_in_delta 1+1i, CMath.sin(CMath.asin(1+1i))
|
||||
assert_in_delta 1+1i, CMath.cos(CMath.acos(1+1i))
|
||||
|
|
Loading…
Reference in a new issue