factory-0.2.1.1: Rational arithmetic in an irrational world.

Safe HaskellNone
LanguageHaskell98

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 Rational quantities, it is a single call to Factory.Math.Summation.sum', rather than the calculation of the many terms in the series, which is the performance-bottleneck.

Synopsis

Functions

openR Source

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.