arithmoi-0.9.0.0: Efficient basic number-theoretic functions.

Copyright(c) 2018 Alexandre Rodrigues Baldé
LicenseMIT
MaintainerAlexandre Rodrigues Baldé <alexandrer_b@outlook.com>
Safe HaskellSafe
LanguageHaskell2010

Math.NumberTheory.Zeta.Hurwitz

Description

Hurwitz zeta function.

Synopsis

Documentation

zetaHurwitz :: forall a. (Floating a, Ord a) => a -> a -> [a] Source #

Values of Hurwitz zeta function evaluated at ζ(s, a) with forall t1 . (Floating t1, Ord t1) => a ∈ t1, and s ∈ [0, 1 ..].

The algorithm used was based on the Euler-Maclaurin formula and was derived from Fast and Rigorous Computation of Special Functions to High Precision by F. Johansson, chapter 4.8, formula 4.8.5.

The error for each value in this recurrence is given in formula 4.8.9 as an indefinite integral, and in formula 4.8.12 as a closed form formula.

It is the user's responsibility to provide an appropriate precision for the type chosen.

For instance, when using Doubles, it does not make sense to provide a number ε >= 1e-53 as the desired precision. For Floats, providing an ε >= 1e-24 also does not make sense. Example of how to call the function:

>>> zetaHurwitz 1e-15 0.25 !! 5
1024.3489745265808