Browse files

Conform to ISO C99 tgamma specification and return -infinity for Math…

…::gamma(-0.0).
  • Loading branch information...
1 parent 724f16d commit 1c1b7a3d8e777c42622e7831f77173e195af9cbe @r-stu31 committed May 3, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 kernel/common/math19.rb
View
1 kernel/common/math19.rb
@@ -35,6 +35,7 @@ def gamma(x)
x = Rubinius::Type.coerce_to_float x
return Float::INFINITY if x == 0.0
+ return -Float::INFINITY if x == -0.0
return Float::NAN if x.nan?
if sign = x.infinite?

0 comments on commit 1c1b7a3

Please sign in to comment.