Data.Ratio

| Haskell Hierarchical Libraries (base package) | Contents | Index
Data.Ratio |
Portability | portable
Stability | stable
Maintainer | libraries@haskell.org
Description
Standard functions on rational numbers
Synopsis
data Ratio a
type Rational = Ratio Integer
(%) :: Integral a => a -> a -> Ratio a
numerator :: Integral a => Ratio a -> a
denominator :: Integral a => Ratio a -> a
approxRational :: RealFrac a => a -> a -> Rational
Documentation
data Ratio a
Instances
Typeable a => Typeable (Ratio a)
(Integral a, Read a) => Read (Ratio a)
Integral a => Ord (Ratio a)
Integral a => Num (Ratio a)
Integral a => Fractional (Ratio a)
Integral a => Real (Ratio a)
Integral a => RealFrac (Ratio a)
Integral a => Show (Ratio a)
Integral a => Enum (Ratio a)
(Integral a, Eq a) => Eq (Ratio a)
type Rational = Ratio Integer
Arbitrary-precision rational numbers, represented as a ratio of two `Integer` values. A rational number may be constructed using the `%` operator.
(%) :: Integral a => a -> a -> Ratio a
numerator :: Integral a => Ratio a -> a
denominator :: Integral a => Ratio a -> a
approxRational :: RealFrac a => a -> a -> Rational
Produced by Haddock version 0.6