factory-0.3.0.0: Rational arithmetic in an irrational world.

Safe HaskellNone
LanguageHaskell2010

Factory.Math.Implementations.Pi.Ramanujan.Algorithm

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Defines the set of Ramanujan-type algorithms which have been implemented; https://en.wikipedia.org/wiki/Pi.

Synopsis

Types

Data-types

data Algorithm squareRootAlgorithm factorialAlgorithm Source #

Define those Ramanujan-series which have been implemented.

Constructors

Classic squareRootAlgorithm factorialAlgorithm

The original version.

Chudnovsky squareRootAlgorithm factorialAlgorithm

A variant found by the Chudnovsky brothers.

Instances

(Eq factorialAlgorithm, Eq squareRootAlgorithm) => Eq (Algorithm squareRootAlgorithm factorialAlgorithm) Source # 

Methods

(==) :: Algorithm squareRootAlgorithm factorialAlgorithm -> Algorithm squareRootAlgorithm factorialAlgorithm -> Bool #

(/=) :: Algorithm squareRootAlgorithm factorialAlgorithm -> Algorithm squareRootAlgorithm factorialAlgorithm -> Bool #

(Read factorialAlgorithm, Read squareRootAlgorithm) => Read (Algorithm squareRootAlgorithm factorialAlgorithm) Source # 

Methods

readsPrec :: Int -> ReadS (Algorithm squareRootAlgorithm factorialAlgorithm) #

readList :: ReadS [Algorithm squareRootAlgorithm factorialAlgorithm] #

readPrec :: ReadPrec (Algorithm squareRootAlgorithm factorialAlgorithm) #

readListPrec :: ReadPrec [Algorithm squareRootAlgorithm factorialAlgorithm] #

(Show factorialAlgorithm, Show squareRootAlgorithm) => Show (Algorithm squareRootAlgorithm factorialAlgorithm) Source # 

Methods

showsPrec :: Int -> Algorithm squareRootAlgorithm factorialAlgorithm -> ShowS #

show :: Algorithm squareRootAlgorithm factorialAlgorithm -> String #

showList :: [Algorithm squareRootAlgorithm factorialAlgorithm] -> ShowS #

(Default squareRootAlgorithm, Default factorialAlgorithm) => Default (Algorithm squareRootAlgorithm factorialAlgorithm) Source # 

Methods

def :: Algorithm squareRootAlgorithm factorialAlgorithm #

(Algorithmic squareRootAlgorithm, Algorithmic factorialAlgorithm) => Algorithmic (Algorithm squareRootAlgorithm factorialAlgorithm) Source # 

Methods

openR :: Algorithm squareRootAlgorithm factorialAlgorithm -> DecimalDigits -> Rational Source #

openI :: Algorithm squareRootAlgorithm factorialAlgorithm -> DecimalDigits -> Integer Source #

openS :: Algorithm squareRootAlgorithm factorialAlgorithm -> DecimalDigits -> String Source #