Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- egyptianFractionDecomposition :: Double -> ([(Integer, Integer)], Double)
- egyptianFractionDecomposition1G :: Double -> ([(Integer, Integer)], Double)
Documentation
egyptianFractionDecomposition :: Double -> ([(Integer, Integer)], Double) Source #
The argument should be greater or equal than 0.005 (1/200) though it is not checked. Returns the
representation of the fraction using canonical ancient Egyptian representation and its error as
Double
value in the resulting tuple.
egyptianFractionDecomposition1G :: Double -> ([(Integer, Integer)], Double) Source #
A variant of egyptianFractionDecomposition
where the fractions does not sum to some other
unit fraction instead (e. g. 13 + 110 + 115 == 12
). More appropriate from the historical
point of view.