exp-pairs-0.2.0.0: 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 # 
Instance details

Defined in Math.ExpPairs.RatioInf

Methods

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

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

Integral t => Fractional (RatioInf t) Source # 
Instance details

Defined in Math.ExpPairs.RatioInf

Integral t => Num (RatioInf t) Source # 
Instance details

Defined in Math.ExpPairs.RatioInf

Integral t => Ord (RatioInf t) Source # 
Instance details

Defined in Math.ExpPairs.RatioInf

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 # 
Instance details

Defined in Math.ExpPairs.RatioInf

Methods

toRational :: RatioInf t -> Rational #

Show t => Show (RatioInf t) Source # 
Instance details

Defined in Math.ExpPairs.RatioInf

Methods

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

show :: RatioInf t -> String #

showList :: [RatioInf t] -> ShowS #

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

Defined in Math.ExpPairs.RatioInf

Methods

pretty :: RatioInf t -> Doc ann #

prettyList :: [RatioInf t] -> Doc ann #

type RationalInf = RatioInf Integer Source #

Arbitrary-precision rational numbers with positive and negative infinities.