Permalink
Browse files

Add a test for gamma(-0).

  • Loading branch information...
1 parent b417d7b commit 724f16d525c844de65731c52ecf172070396fb4d @r-stu31 committed May 3, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 spec/ruby/core/math/gamma_spec.rb
@@ -6,6 +6,10 @@
Math.gamma(0).should == Float::INFINITY
end
+ it "returns -infinity given -0.0" do
+ Math.gamma(-0.0).should == -Float::INFINITY
+ end
+
it "returns Math.sqrt(Math::PI) given 0.5" do
Math.gamma(0.5).should be_close(Math.sqrt(Math::PI), TOLERANCE)
end

0 comments on commit 724f16d

Please sign in to comment.