gonum.org/v1/gonum@v0.14.0/mathext/zeta.go (about)

     1  // Copyright ©2016 The Gonum Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package mathext
     6  
     7  import "gonum.org/v1/gonum/mathext/internal/cephes"
     8  
     9  // Zeta computes the Riemann zeta function of two arguments.
    10  //
    11  //	Zeta(x,q) = \sum_{k=0}^{\infty} (k+q)^{-x}
    12  //
    13  // Note that Zeta returns +Inf if x is 1 and will panic if x is less than 1,
    14  // q is either zero or a negative integer, or q is negative and x is not an
    15  // integer.
    16  //
    17  // See http://mathworld.wolfram.com/HurwitzZetaFunction.html
    18  // or https://en.wikipedia.org/wiki/Multiple_zeta_function#Two_parameters_case
    19  // for more detailed information.
    20  func Zeta(x, q float64) float64 {
    21  	return cephes.Zeta(x, q)
    22  }