packages feed

intervals 0.5 → 0.5.1

raw patch · 6 files changed

+28/−1 lines, 6 files

Files

intervals.cabal view
@@ -1,5 +1,5 @@ name:              intervals-version:           0.5+version:           0.5.1 synopsis:          Interval Arithmetic description:   A 'Numeric.Interval.Interval' is a closed, convex set of floating point values.
src/Numeric/Interval.hs view
@@ -12,6 +12,7 @@ module Numeric.Interval   ( Interval   , (...)+  , interval   , whole   , empty   , null
src/Numeric/Interval/Internal.hs view
@@ -20,6 +20,7 @@ module Numeric.Interval.Internal   ( Interval(..)   , (...)+  , interval   , whole   , empty   , null@@ -81,6 +82,12 @@ posInfinity :: Fractional a => a posInfinity = 1/0 {-# INLINE posInfinity #-}++interval :: Ord a => a -> a -> Maybe (Interval a)+interval a b+  | a <= b = Just $ I a b+  | otherwise = Nothing+{-# INLINE interval #-}  nan :: Fractional a => a nan = 0/0
src/Numeric/Interval/Kaucher.hs view
@@ -20,6 +20,7 @@ module Numeric.Interval.Kaucher   ( Interval(..)   , (...)+  , interval   , whole   , empty   , null@@ -118,9 +119,17 @@   q = realToFrac (truncate $ a / b :: Integer) {-# INLINE fmod #-} +-- | Create a directed interval. (...) :: a -> a -> Interval a (...) = I {-# INLINE (...) #-}++-- | Try to create a non-empty interval.+interval :: Ord a => a -> a -> Maybe (Interval a)+interval a b+  | a <= b = Just $ I a b+  | otherwise = Nothing+  -- | The whole real number line --
src/Numeric/Interval/NonEmpty.hs view
@@ -20,6 +20,7 @@ module Numeric.Interval.NonEmpty   ( Interval   , (...)+  , interval   , whole   , singleton   , elem
src/Numeric/Interval/NonEmpty/Internal.hs view
@@ -19,6 +19,7 @@ module Numeric.Interval.NonEmpty.Internal   ( Interval(..)   , (...)+  , interval   , whole   , singleton   , elem@@ -84,11 +85,19 @@   q = realToFrac (truncate $ a / b :: Integer) {-# INLINE fmod #-} +-- | Create a non-empty interval, turning it around if necessary (...) :: Ord a => a -> a -> Interval a a ... b   | a <= b = I a b   | otherwise = I b a {-# INLINE (...) #-}++-- | Try to create a non-empty interval.+interval :: Ord a => a -> a -> Maybe (Interval a)+interval a b+  | a <= b = Just $ I a b+  | otherwise = Nothing+  -- | The whole real number line --