| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Factory.Math.Implementations.Pi.BBP.Implementation
Contents
Description
AUTHOR- Dr. Alistair Ward
DESCRIPTION
- Implements a Bailey-Borwein-Plouffe formula; http://mathworld.wolfram.com/PiFormulas.html
- Surprisingly, because of the huge size of the
Rationalquantities, it is a single call toFactory.Math.Summation.sum', rather than the calculation of the many terms in the series, which is the performance-bottleneck.
- openR :: Series -> DecimalDigits -> Rational
Functions
Arguments
| :: Series | This Pi-algorithm is parameterised by the type of other algorithms to use. |
| -> DecimalDigits | The number of decimal digits required. |
| -> Rational |
Returns Pi, accurate to the specified number of decimal digits.