`AUTHOR`

- Dr. Alistair Ward
`DESCRIPTION`

- Defines the classes of
*Pi*-algorithm which have been implemented.

# Type-classes

class Algorithm algorithm whereSource

- Defines the methods expected of a
*Pi*-algorithm. - Most of the implementations naturally return a
`Rational`

, but the spigot-algorithms naturally produce a`[Int]`

; though representing*Pi*as a big integer with the decimal point removed is clearly incorrect. - Since representing
*Pi*as either a`Rational`

or promoted to an`Integer`

, is inconvenient, an alternative decimal`String`

-representation is provided.

:: algorithm | |

-> DecimalDigits | |

-> Rational | Returns the value of |

:: algorithm | |

-> DecimalDigits | |

-> Integer | Returns the value of |

:: algorithm | |

-> DecimalDigits | |

-> String | Returns the value of |

Algorithm Algorithm | |

Algorithm Algorithm | |

Algorithm squareRootAlgorithm => Algorithm (Algorithm squareRootAlgorithm) | |

(Algorithm squareRootAlgorithm, Algorithm factorialAlgorithm) => Algorithm (Algorithm squareRootAlgorithm factorialAlgorithm) | |

(Algorithm squareRootAlgorithm, Algorithm factorialAlgorithm) => Algorithm (Algorithm squareRootAlgorithm factorialAlgorithm) | |

(Algorithm agm, Algorithm bbp, Algorithm borwein, Algorithm ramanujan, Algorithm spigot) => Algorithm (Category agm bbp borwein ramanujan spigot) |

# Types

## Data-types

data Category agm bbp borwein ramanujan spigot Source

Categorises the various algorithms.

AGM agm | Algorithms based on the |

BBP bbp | http://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula. |

Borwein borwein | |

Ramanujan ramanujan | |

Spigot spigot | Algorithms from which the digits of |

(Eq agm, Eq bbp, Eq borwein, Eq ramanujan, Eq spigot) => Eq (Category agm bbp borwein ramanujan spigot) | |

(Read agm, Read bbp, Read borwein, Read ramanujan, Read spigot) => Read (Category agm bbp borwein ramanujan spigot) | |

(Show agm, Show bbp, Show borwein, Show ramanujan, Show spigot) => Show (Category agm bbp borwein ramanujan spigot) | |

(Defaultable agm, Defaultable bbp, Defaultable borwein, Defaultable ramanujan, Defaultable spigot) => Defaultable (Category agm bbp borwein ramanujan spigot) | |

(Algorithm agm, Algorithm bbp, Algorithm borwein, Algorithm ramanujan, Algorithm spigot) => Algorithm (Category agm bbp borwein ramanujan spigot) |