factory-0.2.1.1: Rational arithmetic in an irrational world.

Safe HaskellSafe-Inferred
LanguageHaskell98

Factory.Math.Implementations.Pi.Ramanujan.Series

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Defines a http://en.wikipedia.org/wiki/Srinivasa_Ramanujan-type series for Pi.

Synopsis

Types

Data-types

data Series squareRootAlgorithm factorialAlgorithm Source

Defines a series corresponding to a specific Ramanujan-formula.

Constructors

MkSeries 

Fields

terms :: factorialAlgorithm -> [Rational]

The sequence of terms, the sum to infinity of which defines the series.

getSeriesScalingFactor :: squareRootAlgorithm -> DecimalDigits -> Rational

The ratio by which the sum to infinity of the sequence, must be scaled to result in Pi.

convergenceRate :: ConvergenceRate

The expected number of digits of Pi, per term in the series.