Switching to math.Inf(1)
MODIFY
internal/cephes/zeta.go
internal/cephes/zeta.go
@@ -45,7 +45,7 @@ var zetaCoefs = []float64{
// and Products, p. 1073; Academic Press, 1980.
func Zeta(x, q float64) float64 {
if x == 1 {
- return math.MaxFloat64
+ return math.Inf(1)
}
if x < 1 {

MODIFY
zeta_test.go
zeta_test.go
@@ -14,7 +14,7 @@ func TestZeta(t *testing.T) {
x, q, want float64
}{
// Results computed using scipy.special.zeta
- {1, 1, math.MaxFloat64},
+ {1, 1, math.Inf(1)},
{10, 0.5, 1024.0174503557578},
{5, 2.5, 0.013073166646113805},
{1.5, 2, 1.6123753486854886},

Switching to math.Inf(1)