Copyright | (c) Henning Thielemann 2011-2012 (c) Dylan Thurston 2006 |
---|---|
Maintainer | numericprelude@henning-thielemann.de |
Stability | provisional |
Portability | portable (?) |
Safe Haskell | None |
Language | Haskell98 |
Ratios of mathematical objects.
Synopsis
- data T a = (:%) {
- numerator :: !a
- denominator :: !a
- (%) :: C a => a -> a -> T a
- type Rational = T Integer
- fromValue :: C a => a -> T a
- recip :: (C a, C a) => T a -> T a
- scale :: C a => a -> T a -> T a
- split :: C a => T a -> (a, T a)
- showsPrecAuto :: (Eq a, C a, Show a) => Int -> T a -> String -> String
- toRational98 :: Integral a => T a -> Ratio a
Documentation
(:%) | |
|
Instances
C a => C Integer (T a) Source # | |
Eq a => Eq (T a) Source # | |
Integral a => Fractional (T a) Source # | |
Integral a => Num (T a) Source # | |
(Ord a, C a) => Ord (T a) Source # | |
(Read a, C a) => Read (T a) Source # | |
(Show a, C a) => Show (T a) Source # | |
(Arbitrary a, C a, C a) => Arbitrary (T a) Source # | |
(Storable a, C a) => Storable (T a) Source # | |
Defined in Number.Ratio | |
(Random a, C a, C a) => Random (T a) Source # | |
(Ord a, C a) => C (T a) Source # | |
C a => C (T a) Source # | |
(C a, C a) => C (T a) Source # | |
C a => C (T a) Source # | |
(C a, C a) => C (T a) Source # | |
C a => C (T a) Source # | |
(C a, C a) => C (T a) Source # | |
Defined in Algebra.ToInteger toRational :: T a -> Rational Source # | |
(C a, C a) => C (T a) Source # | |
(C a, C a) => C (T a) Source # | |
Defined in Algebra.RealField | |
(Ord a, C a) => C (T a) Source # | |
C a => C (T a) (T a) Source # | |
C a => C (T a) (T a) Source # | |
Defined in Algebra.VectorSpace | |
C a => C (T a) (T a) Source # | |
(C a, C a) => C (T a) (T a) Source # | |
(C a, C a, C a) => C (T a) (T a) Source # | |
(C a, C a) => Sqr (T a) (T a) Source # | |