fractionizer-0.17.0.0: Numbers in the range [0.005, 1] as a sum of 2, 3, 4 or 5 unit fractions of special types.
Safe HaskellSafe-Inferred
LanguageHaskell2010

EgyptianFractions

Synopsis

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.