Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Implements a spigot-algorithm; http://en.wikipedia.org/wiki/Spigot_algorithm.
- Uses the traditional algorithm, rather than the unbounded algorithm described by http://www.comlab.ox.ac.uk/jeremy.gibbons/publications/spigot.pdf.
- decimal :: I
- openI :: Series I -> DecimalDigits -> Integer
Types
Type-synonyms
Constants
Functions
openI :: Series I -> DecimalDigits -> Integer Source
- Initialises a spigot-table with the row of
coefficients
. - Ensures that the row has suffient terms to accurately generate the required number of digits.
- Extracts only those digits which are guaranteed to be accurate.
- CAVEAT: the result is returned as an
Integer
, i.e. without any decimal point.