Description
Standard functions on rational numbers
DocumentationRational numbers, with numerator and denominator of some Integral
type.
Instances
Typeable1 Ratio Integral a => Enum (Ratio a) Eq a => Eq (Ratio a) (Num (Ratio a), Integral a) => Fractional (Ratio a) (Typeable (Ratio a), Data a, Integral a) => Data (Ratio a) Integral a => Num (Ratio a) (Eq (Ratio a), Integral a) => Ord (Ratio a) (Integral a, Read a) => Read (Ratio a) (Num (Ratio a), Ord (Ratio a), Integral a) => Real (Ratio a) (Real (Ratio a), Fractional (Ratio a), Integral a) => RealFrac (Ratio a) (Integral a, Show a) => Show (Ratio a)type Rational = Ratio IntegerSource
Arbitrary-precision rational numbers, represented as a ratio of two Integer
values. A rational number may be constructed using the %
operator.
numerator :: Integral a => Ratio a -> aSource
Extract the numerator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.
denominator :: Integral a => Ratio a -> aSource
Extract the denominator of the ratio in reduced form: the numerator and denominator have no common factor and the denominator is positive.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4