exp-pairs-0.1.5.2: Linear programming over exponent pairs

Copyright(c) Andrew Lelechenko, 2014-2015
LicenseGPL-3
Maintainerandrew.lelechenko@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Math.ExpPairs.RatioInf

Description

Provides types and necessary instances for rational numbers, extended with infinite values. Just use RationalInf instead of Rational from Data.Ratio.

Synopsis

Documentation

data RatioInf t Source #

Extends a rational type with positive and negative infinities.

Constructors

InfMinus

Negative infinity

Finite !(Ratio t)

Finite value

InfPlus

Positive infinity

Instances

Eq t => Eq (RatioInf t) Source # 

Methods

(==) :: RatioInf t -> RatioInf t -> Bool #

(/=) :: RatioInf t -> RatioInf t -> Bool #

Integral t => Fractional (RatioInf t) Source # 
Integral t => Num (RatioInf t) Source # 
Integral t => Ord (RatioInf t) Source # 

Methods

compare :: RatioInf t -> RatioInf t -> Ordering #

(<) :: RatioInf t -> RatioInf t -> Bool #

(<=) :: RatioInf t -> RatioInf t -> Bool #

(>) :: RatioInf t -> RatioInf t -> Bool #

(>=) :: RatioInf t -> RatioInf t -> Bool #

max :: RatioInf t -> RatioInf t -> RatioInf t #

min :: RatioInf t -> RatioInf t -> RatioInf t #

Integral t => Real (RatioInf t) Source # 

Methods

toRational :: RatioInf t -> Rational #

Show t => Show (RatioInf t) Source # 

Methods

showsPrec :: Int -> RatioInf t -> ShowS #

show :: RatioInf t -> String #

showList :: [RatioInf t] -> ShowS #

(Integral t, Pretty t) => Pretty (RatioInf t) Source # 

Methods

pretty :: RatioInf t -> Doc #

prettyList :: [RatioInf t] -> Doc #

type RationalInf = RatioInf Integer Source #

Arbitrary-precision rational numbers with positive and negative infinities.