-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Interval Arithmetic -- -- A Numeric.Interval.Interval is a closed, convex set of floating -- point values. -- -- We do not control the rounding mode of the end points of the interval -- when using floating point arithmetic, so be aware that in order to get -- precise containment of the result, you will need to use an underlying -- type with both lower and upper bounds like CReal @package intervals @version 0.2.2 -- | Interval arithmetic module Numeric.Interval data Interval a I :: !a -> !a -> Interval a -- | The rule of thumb is you should only use this to construct using -- values that you took out of the interval. Otherwise, use I, to force -- rounding (...) :: a -> a -> Interval a -- | The whole real number line whole :: Fractional a => Interval a -- | An empty interval empty :: Fractional a => Interval a -- | negation handles NaN properly null :: Ord a => Interval a -> Bool -- | A singleton point singleton :: a -> Interval a elem :: Ord a => a -> Interval a -> Bool notElem :: Ord a => a -> Interval a -> Bool -- | The infinumum (lower bound) of an interval inf :: Interval a -> a -- | The supremum (upper bound) of an interval sup :: Interval a -> a -- | Is the interval a singleton point? N.B. This is fairly fragile and -- likely will not hold after even a few operations that only involve -- singletons singular :: Ord a => Interval a -> Bool -- | Calculate the width of an interval. width :: Num a => Interval a -> a -- | Nearest point to the midpoint of the interval. midpoint :: Fractional a => Interval a -> a -- | Calculate the intersection of two intervals. intersection :: (Fractional a, Ord a) => Interval a -> Interval a -> Interval a -- | Calculate the convex hull of two intervals hull :: Ord a => Interval a -> Interval a -> Interval a -- | Bisect an interval at its midpoint. bisection :: Fractional a => Interval a -> (Interval a, Interval a) -- | magnitude magnitude :: (Num a, Ord a) => Interval a -> a -- | mignitude mignitude :: (Num a, Ord a) => Interval a -> a contains :: Ord a => Interval a -> Interval a -> Bool isSubsetOf :: Ord a => Interval a -> Interval a -> Bool -- | For all x in X, y in Y. x -- op y certainly :: Ord a => (forall b. Ord b => b -> b -> Bool) -> Interval a -> Interval a -> Bool -- | For all x in X, y in Y. x -- < y ( Interval a -> Interval a -> Bool -- | For all x in X, y in Y. x -- <= y (<=!) :: Ord a => Interval a -> Interval a -> Bool -- | For all x in X, y in Y. x -- == y (==!) :: Eq a => Interval a -> Interval a -> Bool -- | For all x in X, y in Y. x -- >= y (>=!) :: Ord a => Interval a -> Interval a -> Bool -- | For all x in X, y in Y. x -- > y (>!) :: Ord a => Interval a -> Interval a -> Bool -- | Does there exist an x in X, y in Y -- such that x op y? possibly :: Ord a => (forall b. Ord b => b -> b -> Bool) -> Interval a -> Interval a -> Bool -- | Does there exist an x in X, y in Y -- such that x < y? ( Interval a -> Interval a -> Bool -- | Does there exist an x in X, y in Y -- such that x <= y? (<=?) :: Ord a => Interval a -> Interval a -> Bool -- | Does there exist an x in X, y in Y -- such that x == y? (==?) :: Ord a => Interval a -> Interval a -> Bool -- | Does there exist an x in X, y in Y -- such that x >= y? (>=?) :: Ord a => Interval a -> Interval a -> Bool -- | Does there exist an x in X, y in Y -- such that x > y? (>?) :: Ord a => Interval a -> Interval a -> Bool idouble :: Interval Double -> Interval Double ifloat :: Interval Float -> Interval Float instance RealExtras a => RealExtras (Interval a) instance RealExtras a => RealFloat (Interval a) instance (RealExtras a, Ord a) => Floating (Interval a) instance RealFloat a => RealFrac (Interval a) instance (Fractional a, Ord a) => Fractional (Interval a) instance Ord a => Ord (Interval a) instance Real a => Real (Interval a) instance (Num a, Ord a) => Num (Interval a) instance Show a => Show (Interval a) instance Eq a => Eq (Interval a)