diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-23 17:21:26 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-23 17:21:26 +0000 |
commit | eed520c8d28d8d1410db4394aa8d0537bf3f4b82 (patch) | |
tree | 4acfdf113505668bec6bf86d80e2933370e6b1ff /test | |
parent | babe8ec7e7aa4654f826b1973557c712c36c72a1 (diff) | |
download | ruby-eed520c8d28d8d1410db4394aa8d0537bf3f4b82.tar.gz ruby-eed520c8d28d8d1410db4394aa8d0537bf3f4b82.tar.xz ruby-eed520c8d28d8d1410db4394aa8d0537bf3f4b82.zip |
* ext/bigdecimal/lib/bigdecimal/math.rb (atan): atan(Infinity) is
PI/2.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/bigdecimal/test_bigmath.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/bigdecimal/test_bigmath.rb b/test/bigdecimal/test_bigmath.rb index 7801e6045..2870664bc 100644 --- a/test/bigdecimal/test_bigmath.rb +++ b/test/bigdecimal/test_bigmath.rb @@ -21,7 +21,7 @@ class TestBigMath < Test::Unit::TestCase assert_equal(0.0, sqrt(BigDecimal("-0"), N)) assert_raise(FloatDomainError) {sqrt(BigDecimal("-1.0"), N)} assert_raise(FloatDomainError) {sqrt(NAN, N)} - assert_equal(PINF, sqrt(PINF, N)) + assert_raise(FloatDomainError) {sqrt(PINF, N)} end def test_sin @@ -56,6 +56,7 @@ class TestBigMath < Test::Unit::TestCase assert_equal(0.0, atan(BigDecimal("0.0"), N)) assert_in_delta(Math::PI/4, atan(BigDecimal("1.0"), N)) assert_in_delta(Math::PI/6, atan(sqrt(BigDecimal("3.0"), N) / 3, N)) + assert_in_delta(Math::PI/2, atan(PINF, N)) end def test_exp |