* math.c (math_gamma): optimization for passed small integer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
gogotanaka 2015-03-14 11:07:49 +00:00
parent ffe896c3cb
commit 0e749ddedc
3 changed files with 12 additions and 7 deletions

View file

@ -240,6 +240,8 @@ class TestMath < Test::Unit::TestCase
check(2, Math.gamma(3))
check(15 * sqrt_pi / 8, Math.gamma(3.5))
check(6, Math.gamma(4))
check(1.1240007277776077e+21, Math.gamma(23))
check(2.5852016738885062e+22, Math.gamma(24))
# no SEGV [ruby-core:25257]
31.upto(65) do |i|