1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/bigdecimal/lib/bigdecimal/math.rb (atan): atan(Infinity) is

PI/2.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-09-23 17:21:26 +00:00
parent 1ef3ac4738
commit 39ea1c8c7c
3 changed files with 13 additions and 15 deletions

View file

@ -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