Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | GHC2021 |
Generalized Ratio type that accepts arbitrary 'Num a' types rather than just Integral ones as in Data.Ratio
Documentation
Generalized Ratio type that accepts more general "base" types than just Integral ones. That does mean we cannot normalize the intermediate expressions, so expect the numbers to become big quite quickly!
invariant: the denominator is not zero
(%) :: (Eq a, Num a) => a -> a -> GRatio a Source #
smart constructor to construct a GRatio. Throws an exception if the denominator is zero.
denominator :: GRatio a -> a Source #
Get the denominator