mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 06:56:13 +02:00
math.c: fix tgamma
* math.c (ruby_tgamma): fix tgamma(-0.0) on mingw. [ruby-core:74817] [Bug #12249] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a491508753
commit
41c533446f
3 changed files with 19 additions and 4 deletions
|
@ -255,6 +255,10 @@ class TestMath < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
assert_raise(Math::DomainError) { Math.gamma(-Float::INFINITY) }
|
||||
x = Math.gamma(-0.0)
|
||||
mesg = "Math.gamma(-0.0) should be -INF"
|
||||
assert_infinity(x, mesg)
|
||||
assert_predicate(x, :negative?, mesg)
|
||||
end
|
||||
|
||||
def test_lgamma
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue