Commit 13443ccc authored by Rob Pike's avatar Rob Pike

math: fix gamma doc, link to OEIS

Fixes #2940.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5645078
parent ee3e24f2
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
package math package math
// Mathematical constants. // Mathematical constants.
// Reference: http://www.research.att.com/~njas/sequences/Axxxxxx // Reference: http://oeis.org/Axxxxxx
const ( const (
E = 2.71828182845904523536028747135266249775724709369995957496696763 // A001113 E = 2.71828182845904523536028747135266249775724709369995957496696763 // A001113
Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // A000796 Pi = 3.14159265358979323846264338327950288419716939937510582097494459 // A000796
......
...@@ -116,7 +116,7 @@ func stirling(x float64) float64 { ...@@ -116,7 +116,7 @@ func stirling(x float64) float64 {
// Gamma(±Inf) = ±Inf // Gamma(±Inf) = ±Inf
// Gamma(NaN) = NaN // Gamma(NaN) = NaN
// Large values overflow to +Inf. // Large values overflow to +Inf.
// Negative integer values equal ±Inf. // Zero and negative integer arguments return ±Inf.
func Gamma(x float64) float64 { func Gamma(x float64) float64 {
const Euler = 0.57721566490153286060651209008240243104215933593992 // A001620 const Euler = 0.57721566490153286060651209008240243104215933593992 // A001620
// special cases // special cases
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment