]> Cypherpunks repositories - gostls13.git/commitdiff
math: fix gamma doc, link to OEIS
authorRob Pike <r@golang.org>
Fri, 10 Feb 2012 04:56:51 +0000 (15:56 +1100)
committerRob Pike <r@golang.org>
Fri, 10 Feb 2012 04:56:51 +0000 (15:56 +1100)
Fixes #2940.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5645078

src/pkg/math/const.go
src/pkg/math/gamma.go

index 282561f98bbfb178767577b052b5c24bc06eadde..edb14f6fa435dd1d31d29b395766d235010ef391 100644 (file)
@@ -6,7 +6,7 @@
 package math
 
 // Mathematical constants.
-// Reference: http://www.research.att.com/~njas/sequences/Axxxxxx
+// Reference: http://oeis.org/Axxxxxx
 const (
        E   = 2.71828182845904523536028747135266249775724709369995957496696763 // A001113
        Pi  = 3.14159265358979323846264338327950288419716939937510582097494459 // A000796
index 2385a53b8a5cc7819525b85dda1378440918d325..7c6f421bad1a2a1a6912dbd26552632ddd0ddd9e 100644 (file)
@@ -116,7 +116,7 @@ func stirling(x float64) float64 {
 //     Gamma(±Inf) = ±Inf
 //     Gamma(NaN) = NaN
 // Large values overflow to +Inf.
-// Negative integer values equal ±Inf.
+// Zero and negative integer arguments return ±Inf.
 func Gamma(x float64) float64 {
        const Euler = 0.57721566490153286060651209008240243104215933593992 // A001620
        // special cases