From: Rob Pike Date: Fri, 10 Feb 2012 04:56:51 +0000 (+1100) Subject: math: fix gamma doc, link to OEIS X-Git-Tag: weekly.2012-02-14~152 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=13443ccc2aa102cb57cdefd8a44d03257ae1777b;p=gostls13.git math: fix gamma doc, link to OEIS Fixes #2940. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5645078 --- diff --git a/src/pkg/math/const.go b/src/pkg/math/const.go index 282561f98b..edb14f6fa4 100644 --- a/src/pkg/math/const.go +++ b/src/pkg/math/const.go @@ -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 diff --git a/src/pkg/math/gamma.go b/src/pkg/math/gamma.go index 2385a53b8a..7c6f421bad 100644 --- a/src/pkg/math/gamma.go +++ b/src/pkg/math/gamma.go @@ -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