Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…::gamma(-0.0).
  • Loading branch information...
commit 1c1b7a3d8e777c42622e7831f77173e195af9cbe 1 parent 724f16d
r-stu31 authored

Showing 1 changed file with 1 addition and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  kernel/common/math19.rb
1  kernel/common/math19.rb
@@ -35,6 +35,7 @@ def gamma(x)
35 35 x = Rubinius::Type.coerce_to_float x
36 36
37 37 return Float::INFINITY if x == 0.0
  38 + return -Float::INFINITY if x == -0.0
38 39 return Float::NAN if x.nan?
39 40
40 41 if sign = x.infinite?

0 comments on commit 1c1b7a3

Please sign in to comment.
Something went wrong with that request. Please try again.