arithmoi-0.9.0.0: Efficient basic number-theoretic functions.

Copyright (c) 2018 Alexandre Rodrigues Baldé MIT Alexandre Rodrigues Baldé Safe Haskell2010

Math.NumberTheory.Zeta.Dirichlet

Description

Dirichlet beta-function.

Synopsis

# Documentation

betas :: (Floating a, Ord a) => a -> [a] Source #

Infinite sequence of approximate (up to given precision) values of Dirichlet beta-function at integer arguments, starting with β(0).

The algorithm previously used to compute β for even arguments was derived from An Euler-type formula for β(2n) and closed-form expressions for a class of zeta series by F. M. S. Lima, formula (12), but is now based on the zetaHurwitz recurrence.

>>> take 5 (betas 1e-14) :: [Double]
[0.5,0.7853981633974483,0.9159655941772189,0.9689461462593694,0.9889445517411051]


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

Infinite sequence of approximate values of the Dirichlet β function at positive even integer arguments, starting with β(0).

Infinite sequence of exact values of Dirichlet beta-function at odd arguments, starting with β(1).

>>> approximateValue (betasOdd !! 25) :: Double
0.9999999999999987
>>> import Data.Number.Fixed
>>> approximateValue (betasOdd !! 25) :: Fixed Prec50
0.99999999999999999999999960726927497384196726751694