factory-0.3.0.0: Rational arithmetic in an irrational world.

Safe HaskellNone
LanguageHaskell2010

Factory.Math.Implementations.Pi.Ramanujan.Implementation

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Implements a Ramanujan-type series for Pi; https://en.wikipedia.org/wiki/Srinivasa_Ramanujan.

Synopsis

Functions

openR Source #

Arguments

:: Series squareRootAlgorithm factorialAlgorithm

This Pi-algorithm is parameterised by the type of other algorithms to use.

-> squareRootAlgorithm

The specific square-root algorithm to apply to the above series.

-> factorialAlgorithm

The specific factorial-algorithm to apply to the above series.

-> DecimalDigits

The number of decimal digits required.

-> Rational 

Returns Pi, accurate to the specified number of decimal digits.