re      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Safe0(c) Edward Kmett 2010-2013BSD3ekmett@gmail.com experimentalDeriveDataTypeableSafe05OT1The whole real number linewhole-Infinity ... InfinityAn empty intervalemptyEmptyCheck if an interval is emptynull (1 ... 5)Falsenull (1 ... 1)False null emptyTrueA singleton point singleton 11 ... 1(The infimum (lower bound) of an intervalinf (1.0 ... 20.0)1.0 inf empty*** Exception: empty interval)The supremum (upper bound) of an intervalsup (1.0 ... 20.0)20.0 sup empty*** Exception: empty intervalIs the interval a singleton point? N.B. This is fairly fragile and likely will not hold after even a few operations that only involve singletonssingular (singleton 1)Truesingular (1.0 ... 20.0)False#Calculate the width of an interval.width (1 ... 20)19width (singleton 1)0 width empty0 Magnitudemagnitude (1 ... 20)20magnitude (-20 ... 10)20magnitude (singleton 5)5throws  if the interval is empty.magnitude empty*** Exception: empty interval "mignitude"mignitude (1 ... 20)1mignitude (-20 ... 10)0mignitude (singleton 5)5throws  if the interval is empty.mignitude empty*** Exception: empty interval%Hausdorff distance between intervals.distance (1 ... 7) (6 ... 10)0distance (1 ... 7) (15 ... 24)8distance (1 ... 7) (-10 ... -2)3distance Empty (1 ... 1)*** Exception: empty interval1Inflate an interval by enlarging it at both ends.inflate 3 (-1 ... 7) -4 ... 10inflate (-2) (0 ... 4)-2 ... 6inflate 1 emptyEmpty 3Deflate an interval by shrinking it from both ends.deflate 3.0 (-4.0 ... 10.0) -1.0 ... 7.0deflate 2.0 (-1.0 ... 1.0)Emptydeflate 1.0 emptyEmpty!%Scale an interval about its midpoint.scale 1.1 (-6.0 ... 4.0) -6.5 ... 4.5scale (-2.0) (-1.0 ... 1.0)Emptyscale 3.0 emptyEmpty"Construct a symmetric interval. symmetric 3-3 ... 3symmetric (-2)-2 ... 2##Bisect an interval at its midpoint.bisect (10.0 ... 20.0)(10.0 ... 15.0,15.0 ... 20.0)bisect (singleton 5.0)(5.0 ... 5.0,5.0 ... 5.0) bisect Empty (Empty,Empty)%.Nearest point to the midpoint of the interval.midpoint (10.0 ... 20.0)15.0midpoint (singleton 5.0)5.0midpoint empty*** Exception: empty interval&(Determine if a point is in the interval.member 3.2 (1.0 ... 5.0)Truemember 5 (1.0 ... 5.0)Truemember 1 (1.0 ... 5.0)Truemember 8 (1.0 ... 5.0)Falsemember 5 emptyFalse'4Determine if a point is not included in the intervalnotMember 8 (1.0 ... 5.0)TruenotMember 1.4 (1.0 ... 5.0)False9And of course, nothing is a member of the empty interval.notMember 5 emptyTrue((Determine if a point is in the interval.elem 3.2 (1.0 ... 5.0)Trueelem 5 (1.0 ... 5.0)Trueelem 1 (1.0 ... 5.0)Trueelem 8 (1.0 ... 5.0)False elem 5 emptyFalse)4Determine if a point is not included in the intervalnotElem 8 (1.0 ... 5.0)TruenotElem 1.4 (1.0 ... 5.0)False9And of course, nothing is a member of the empty interval.notElem 5 emptyTrue9lift a monotone increasing function over a given interval9lift a monotone decreasing function over a given interval*,Calculate the intersection of two intervals.Hintersection (1 ... 10 :: Interval Double) (5 ... 15 :: Interval Double) 5.0 ... 10.0+*Calculate the convex hull of two intervals@hull (0 ... 10 :: Interval Double) (5 ... 15 :: Interval Double) 0.0 ... 15.0Ahull (15 ... 85 :: Interval Double) (0 ... 10 :: Interval Double) 0.0 ... 85.0,For all x in X, y in Y. x  y?(5 ... 10 :: Interval Double) <! (20 ... 30 :: Interval Double)True?(5 ... 10 :: Interval Double) <! (10 ... 30 :: Interval Double)False?(20 ... 30 :: Interval Double) <! (5 ... 10 :: Interval Double)False-For all x in X, y in Y. x  y@(5 ... 10 :: Interval Double) <=! (20 ... 30 :: Interval Double)True@(5 ... 10 :: Interval Double) <=! (10 ... 30 :: Interval Double)True@(20 ... 30 :: Interval Double) <=! (5 ... 10 :: Interval Double)False.For all x in X, y in Y. x  y;Only singleton intervals or empty intervals can return trueE(singleton 5 :: Interval Double) ==! (singleton 5 :: Interval Double)True?(5 ... 10 :: Interval Double) ==! (5 ... 10 :: Interval Double)FalseFor all x in X, y in Y. x  y@(5 ... 15 :: Interval Double) /=! (20 ... 40 :: Interval Double)True@(5 ... 15 :: Interval Double) /=! (15 ... 40 :: Interval Double)False/For all x in X, y in Y. x  y@(20 ... 40 :: Interval Double) >! (10 ... 19 :: Interval Double)True?(5 ... 20 :: Interval Double) >! (15 ... 40 :: Interval Double)False0For all x in X, y in Y. x  yA(20 ... 40 :: Interval Double) >=! (10 ... 20 :: Interval Double)True@(5 ... 20 :: Interval Double) >=! (15 ... 40 :: Interval Double)False1For all x in X, y in Y. x op y2Check if interval X totally contains interval YH(20 ... 40 :: Interval Double) `contains` (25 ... 35 :: Interval Double)TrueH(20 ... 40 :: Interval Double) `contains` (15 ... 35 :: Interval Double)False3Flipped version of 2. Check if interval X a subset of interval YJ(25 ... 35 :: Interval Double) `isSubsetOf` (20 ... 40 :: Interval Double)TrueJ(20 ... 40 :: Interval Double) `isSubsetOf` (15 ... 35 :: Interval Double)False4Does there exist an x in X, y in Y such that x  y?5Does there exist an x in X, y in Y such that x  y?6Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?7Does there exist an x in X, y in Y such that x  y?8Does there exist an x in X, y in Y such that x  y?9Does there exist an x in X, y in Y such that x op y?:*id function. Useful for type specification:t idouble (1 ... 3)$idouble (1 ... 3) :: Interval Double;*id function. Useful for type specification:t ifloat (1 ... 3)"ifloat (1 ... 3) :: Interval Float<an interval containing all x  y >>> (5  3) & ((4...6) < (2...4)) True >>> (1...10) <* ((-5)...4) *** Exception: divide by zero=an interval containing all x  y >>> (5  3) & ((4...6) = (2...4)) True >>> (1...10) =* ((-5)...4) *** Exception: divide by zero>an interval containing all x  y >>> (5  3) & ((4...6) > (2...4)) True >>> (1...10) >* ((-5)...4) *** Exception: divide by zero?an interval containing all x  y >>> (5  3) & ((4...6) ? (2...4)) True >>> (1...10) ?* ((-5)...4) *** Exception: divide by zero@vWe have to play some semantic games to make these methods make sense. Most compute with the midpoint of the interval.D will use the midpointE !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG2 !"#$%&'()*+,-./0123456789:;<=>?2&'()%*+#$ !"231,-.0/945687:;<=>?C !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG63(c) Edward Kmett 2010-2014BSD3ekmett@gmail.com experimentalDeriveDataTypeableSafe05OT4OCreate a directed interval.P#Try to create a non-empty interval.QThe whole real number linewhole-Infinity ... InfinityRAn empty intervalempty NaN ... NaNSnegation handles NaN properlynull (1 ... 5)Falsenull (1 ... 1)False null emptyTrueTA singleton point singleton 11 ... 1U*The infinumum (lower bound) of an intervalinf (1 ... 20)1V)The supremum (upper bound) of an intervalsup (1 ... 20)20WIs the interval a singleton point? N.B. This is fairly fragile and likely will not hold after even a few operations that only involve singletonssingular (singleton 1)Truesingular (1.0 ... 20.0)FalseX#Calculate the width of an interval.width (1 ... 20)19width (singleton 1)0 width emptyNaNY Magnitudemagnitude (1 ... 20)20magnitude (-20 ... 10)20magnitude (singleton 5)5Z "mignitude"mignitude (1 ... 20)1mignitude (-20 ... 10)0mignitude (singleton 5)5mignitude emptyNaN[/Hausdorff distance between non-empty intervals.distance (1 ... 7) (6 ... 10)0distance (1 ... 7) (15 ... 24)8distance (1 ... 7) (-10 ... -2)3distance empty (1 ... 1)NaN\1Inflate an interval by enlarging it at both ends.inflate 3 (-1 ... 7) -4 ... 10inflate (-2) (0 ... 4)2 ... 2]3Deflate an interval by shrinking it from both ends.deflate 3.0 (-4.0 ... 10.0) -1.0 ... 7.0deflate 2.0 (-1.0 ... 1.0) 1.0 ... -1.0^%Scale an interval about its midpoint.scale 1.1 (-6.0 ... 4.0) -6.5 ... 4.5scale (-2.0) (-1.0 ... 1.0) 2.0 ... -2.0_Construct a symmetric interval. symmetric 3-3 ... 3symmetric (-2)2 ... -2`#Bisect an interval at its midpoint.bisect (10.0 ... 20.0)(10.0 ... 15.0,15.0 ... 20.0)bisect (singleton 5.0)(5.0 ... 5.0,5.0 ... 5.0) bisect empty(NaN ... NaN,NaN ... NaN)a.Nearest point to the midpoint of the interval.midpoint (10.0 ... 20.0)15.0midpoint (singleton 5.0)5.0midpoint emptyNaNb(Determine if a point is in the interval.member 3.2 (1.0 ... 5.0)Truemember 5 (1.0 ... 5.0)Truemember 1 (1.0 ... 5.0)Truemember 8 (1.0 ... 5.0)Falsemember 5 emptyFalsec4Determine if a point is not included in the intervalnotMember 8 (1.0 ... 5.0)TruenotMember 1.4 (1.0 ... 5.0)False9And of course, nothing is a member of the empty interval.notMember 5 emptyTrued(Determine if a point is in the interval.elem 3.2 (1.0 ... 5.0)Trueelem 5 (1.0 ... 5.0)Trueelem 1 (1.0 ... 5.0)Trueelem 8 (1.0 ... 5.0)False elem 5 emptyFalsee4Determine if a point is not included in the intervalnotElem 8 (1.0 ... 5.0)TruenotElem 1.4 (1.0 ... 5.0)False9And of course, nothing is a member of the empty interval.notElem 5 emptyTrue9lift a monotone increasing function over a given interval9lift a monotone decreasing function over a given intervalf,Calculate the intersection of two intervals.Hintersection (1 ... 10 :: Interval Double) (5 ... 15 :: Interval Double) 5.0 ... 10.0g*Calculate the convex hull of two intervals@hull (0 ... 10 :: Interval Double) (5 ... 15 :: Interval Double) 0.0 ... 15.0Ahull (15 ... 85 :: Interval Double) (0 ... 10 :: Interval Double) 0.0 ... 85.0hFor all x in X, y in Y. x  y?(5 ... 10 :: Interval Double) <! (20 ... 30 :: Interval Double)True?(5 ... 10 :: Interval Double) <! (10 ... 30 :: Interval Double)False?(20 ... 30 :: Interval Double) <! (5 ... 10 :: Interval Double)FalseiFor all x in X, y in Y. x  y@(5 ... 10 :: Interval Double) <=! (20 ... 30 :: Interval Double)True@(5 ... 10 :: Interval Double) <=! (10 ... 30 :: Interval Double)True@(20 ... 30 :: Interval Double) <=! (5 ... 10 :: Interval Double)FalsejFor all x in X, y in Y. x  y$Only singleton intervals return trueE(singleton 5 :: Interval Double) ==! (singleton 5 :: Interval Double)True?(5 ... 10 :: Interval Double) ==! (5 ... 10 :: Interval Double)FalseFor all x in X, y in Y. x  y@(5 ... 15 :: Interval Double) /=! (20 ... 40 :: Interval Double)True@(5 ... 15 :: Interval Double) /=! (15 ... 40 :: Interval Double)FalsekFor all x in X, y in Y. x  y@(20 ... 40 :: Interval Double) >! (10 ... 19 :: Interval Double)True?(5 ... 20 :: Interval Double) >! (15 ... 40 :: Interval Double)FalselFor all x in X, y in Y. x  yA(20 ... 40 :: Interval Double) >=! (10 ... 20 :: Interval Double)True@(5 ... 20 :: Interval Double) >=! (15 ... 40 :: Interval Double)FalsemFor all x in X, y in Y. x op ynCheck if interval X totally contains interval YH(20 ... 40 :: Interval Double) `contains` (25 ... 35 :: Interval Double)TrueH(20 ... 40 :: Interval Double) `contains` (15 ... 35 :: Interval Double)FalseoFlipped version of n. Check if interval X a subset of interval YJ(25 ... 35 :: Interval Double) `isSubsetOf` (20 ... 40 :: Interval Double)TrueJ(20 ... 40 :: Interval Double) `isSubsetOf` (15 ... 35 :: Interval Double)FalsepDoes there exist an x in X, y in Y such that x  y?qDoes there exist an x in X, y in Y such that x  y?rDoes there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?sDoes there exist an x in X, y in Y such that x  y?tDoes there exist an x in X, y in Y such that x  y?uDoes there exist an x in X, y in Y such that x op y?vFThe nearest value to that supplied which is contained in the interval.w*id function. Useful for type specification:t idouble (1 ... 3)$idouble (1 ... 3) :: Interval Doublex*id function. Useful for type specification:t ifloat (1 ... 3)"ifloat (1 ... 3) :: Interval Floatyan interval containing all x  y >>> (5  3) b ((4...6) y (2...4)) True >>> (1...10) y* ((-5)...4) *** Exception: divide by zerozan interval containing all x  y >>> (5  3) b ((4...6) z (2...4)) True >>> (1...10) z* ((-5)...4) *** Exception: divide by zero{an interval containing all x  y >>> (5  3) b ((4...6) { (2...4)) True >>> (1...10) {* ((-5)...4) *** Exception: divide by zero|an interval containing all x  y >>> (5  3) b ((4...6) | (2...4)) True >>> (1...10) |* ((-5)...4) *** Exception: divide by zero}vWe have to play some semantic games to make these methods make sense. Most compute with the midpoint of the interval. will use the midpointIMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0MNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|0MNOPQRSTbcdeUVWXafg`YZ[\]^_nomhijlkupqrtsvwxyz{|HMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~O3(c) Edward Kmett 2010-2014BSD3ekmett@gmail.com experimentalDeriveDataTypeableSafe05OT5;Create a non-empty interval, turning it around if necessary#Try to create a non-empty interval.The whole real number linewhole-Infinity ... Infinity(x :: Double) `elem` wholeA singleton point singleton 11 ... 1x `elem` (singleton x)$x /= y ==> y `notElem` (singleton x)*The infinumum (lower bound) of an intervalinf (1 ... 20)1min x y == inf (x ... y)inf x <= sup x)The supremum (upper bound) of an intervalsup (1 ... 20)20sup x `elem` xmax x y == sup (x ... y)inf x <= sup xIs the interval a singleton point? N.B. This is fairly fragile and likely will not hold after even a few operations that only involve singletonssingular (singleton 1)Truesingular (1.0 ... 20.0)False#Calculate the width of an interval.width (1 ... 20)19width (singleton 1)0 0 <= width x Magnitudemagnitude (1 ... 20)20magnitude (-20 ... 10)20magnitude (singleton 5)50 <= magnitude x "mignitude"mignitude (1 ... 20)1mignitude (-20 ... 10)0mignitude (singleton 5)50 <= mignitude x#Bisect an interval at its midpoint.bisect (10.0 ... 20.0)(10.0 ... 15.0,15.0 ... 20.0)bisect (singleton 5.0)(5.0 ... 5.0,5.0 ... 5.0)<let (a, b) = bisect (x :: Interval Double) in sup a == inf b<let (a, b) = bisect (x :: Interval Double) in inf a == inf x<let (a, b) = bisect (x :: Interval Double) in sup b == sup x.Nearest point to the midpoint of the interval.midpoint (10.0 ... 20.0)15.0midpoint (singleton 5.0)5.0(midpoint x `elem` (x :: Interval Double)%Hausdorff distance between intervals.distance (1 ... 7) (6 ... 10)0distance (1 ... 7) (15 ... 24)8distance (1 ... 7) (-10 ... -2)3Fcommutative (distance :: Interval Double -> Interval Double -> Double)0 <= distance x y(Determine if a point is in the interval.member 3.2 (1.0 ... 5.0)Truemember 5 (1.0 ... 5.0)Truemember 1 (1.0 ... 5.0)Truemember 8 (1.0 ... 5.0)False4Determine if a point is not included in the intervalnotMember 8 (1.0 ... 5.0)TruenotMember 1.4 (1.0 ... 5.0)False(Determine if a point is in the interval.elem 3.2 (1.0 ... 5.0)Trueelem 5 (1.0 ... 5.0)Trueelem 1 (1.0 ... 5.0)Trueelem 8 (1.0 ... 5.0)False4Determine if a point is not included in the intervalnotElem 8 (1.0 ... 5.0)TruenotElem 1.4 (1.0 ... 5.0)False9lift a monotone increasing function over a given interval9lift a monotone decreasing function over a given interval,Calculate the intersection of two intervals.Hintersection (1 ... 10 :: Interval Double) (5 ... 15 :: Interval Double)Just (5.0 ... 10.0)*Calculate the convex hull of two intervals@hull (0 ... 10 :: Interval Double) (5 ... 15 :: Interval Double) 0.0 ... 15.0Ahull (15 ... 85 :: Interval Double) (0 ... 10 :: Interval Double) 0.0 ... 85.0conservative2 const hullconservative2 (flip const) hullFor all x in X, y in Y. x  y?(5 ... 10 :: Interval Double) <! (20 ... 30 :: Interval Double)True?(5 ... 10 :: Interval Double) <! (10 ... 30 :: Interval Double)False?(20 ... 30 :: Interval Double) <! (5 ... 10 :: Interval Double)FalseFor all x in X, y in Y. x  y@(5 ... 10 :: Interval Double) <=! (20 ... 30 :: Interval Double)True@(5 ... 10 :: Interval Double) <=! (10 ... 30 :: Interval Double)True@(20 ... 30 :: Interval Double) <=! (5 ... 10 :: Interval Double)FalseFor all x in X, y in Y. x  y;Only singleton intervals or empty intervals can return trueE(singleton 5 :: Interval Double) ==! (singleton 5 :: Interval Double)True?(5 ... 10 :: Interval Double) ==! (5 ... 10 :: Interval Double)FalseFor all x in X, y in Y. x  y@(5 ... 15 :: Interval Double) /=! (20 ... 40 :: Interval Double)True@(5 ... 15 :: Interval Double) /=! (15 ... 40 :: Interval Double)FalseFor all x in X, y in Y. x  y@(20 ... 40 :: Interval Double) >! (10 ... 19 :: Interval Double)True?(5 ... 20 :: Interval Double) >! (15 ... 40 :: Interval Double)FalseFor all x in X, y in Y. x  yA(20 ... 40 :: Interval Double) >=! (10 ... 20 :: Interval Double)True@(5 ... 20 :: Interval Double) >=! (15 ... 40 :: Interval Double)FalseFor all x in X, y in Y. x op yCheck if interval X totally contains interval YH(20 ... 40 :: Interval Double) `contains` (25 ... 35 :: Interval Double)TrueH(20 ... 40 :: Interval Double) `contains` (15 ... 35 :: Interval Double)FalseFlipped version of . Check if interval X a subset of interval YJ(25 ... 35 :: Interval Double) `isSubsetOf` (20 ... 40 :: Interval Double)TrueJ(20 ... 40 :: Interval Double) `isSubsetOf` (15 ... 35 :: Interval Double)FalseDoes there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x  y?Does there exist an x in X, y in Y such that x op y?FThe nearest value to that supplied which is contained in the interval.(clamp xs y) `elem` xs1Inflate an interval by enlarging it at both ends.inflate 3 (-1 ... 7) -4 ... 10inflate (-2) (0 ... 4)-2 ... 6inflate x i `contains` iDeflate an interval by shrinking it from both ends. Note that in cases that would result in an empty interval, the result is a singleton interval at the midpoint.deflate 3.0 (-4.0 ... 10.0) -1.0 ... 7.0deflate 2.0 (-1.0 ... 1.0) 0.0 ... 0.0%Scale an interval about its midpoint.scale 1.1 (-6.0 ... 4.0) -6.5 ... 4.5scale (-2.0) (-1.0 ... 1.0) -2.0 ... 2.03abs x >= 1 ==> (scale (x :: Double) i) `contains` iQforAll (choose (0,1)) $ \x -> abs x <= 1 ==> i `contains` (scale (x :: Double) i)Construct a symmetric interval. symmetric 3-3 ... 3symmetric (-2)-2 ... 2x `elem` symmetric x0 `elem` symmetric x*id function. Useful for type specification:t idouble (1 ... 3)$idouble (1 ... 3) :: Interval Double*id function. Useful for type specification:t ifloat (1 ... 3)"ifloat (1 ... 3) :: Interval Floatan interval containing all x F y prop> forAll (memberOf xs) $ x -> forAll (memberOf ys) $ y -> 0  ys ==> (x  y)  (xs  ys) prop> 0 / ys ==> ioProperty $ do z <- try (evaluate (xs ' ys)); return $ z === Left DivideByZeroan interval containing all x F y prop> forAll (memberOf xs) $ x -> forAll (memberOf ys) $ y -> 0  ys ==> (x  y)  (xs  ys) prop> 0 / ys ==> ioProperty $ do z <- try (evaluate (xs ' ys)); return $ z === Left DivideByZeroan interval containing all x F y prop> forAll (memberOf xs) $ x -> forAll (memberOf ys) $ y -> 0  ys ==> (x  y)  (xs  ys) prop> 0 / ys ==> ioProperty $ do z <- try (evaluate (xs ' ys)); return $ z === Left DivideByZeroan interval containing all x F y prop> forAll (memberOf xs) $ x -> forAll (memberOf ys) $ y -> 0  ys ==> (x  y)  (xs  ys) prop> 0 / ys ==> ioProperty $ do z <- try (evaluate (xs ' ys)); return $ z === Left DivideByZerovWe have to play some semantic games to make these methods make sense. Most compute with the midpoint of the interval.'Transcendental functions for intervals.*conservative (exp :: Double -> Double) exp3conservativeExceptNaN (log :: Double -> Double) log*conservative (sin :: Double -> Double) sin*conservative (cos :: Double -> Double) cos*conservative (tan :: Double -> Double) tan5conservativeExceptNaN (asin :: Double -> Double) asin5conservativeExceptNaN (acos :: Double -> Double) acos,conservative (atan :: Double -> Double) atan,conservative (sinh :: Double -> Double) sinh,conservative (cosh :: Double -> Double) cosh,conservative (tanh :: Double -> Double) tanh7conservativeExceptNaN (asinh :: Double -> Double) asinh7conservativeExceptNaN (acosh :: Double -> Double) acosh7conservativeExceptNaN (atanh :: Double -> Double) atanhcos (0 ... (pi + 0.1)) -1.0 ... 1.0"Fractional instance for intervals.Qys /= singleton 0 ==> conservative2 ((/) :: Double -> Double -> Double) (/) xs ysGxs /= singleton 0 ==> conservative (recip :: Double -> Double) recip xs will use the midpointNum instance for intervals.5conservative2 ((+) :: Double -> Double -> Double) (+)5conservative2 ((-) :: Double -> Double -> Double) (-)5conservative2 ((*) :: Double -> Double -> Double) (*)*conservative (abs :: Double -> Double) absD//C3(c) Edward Kmett 2010-2013BSD3ekmett@gmail.com experimentalDeriveDataTypeableSafe05OT..(c) Edward Kmett 2010-2014BSD3ekmett@gmail.com experimentalDeriveDataTypeableSafe0 !"#$%&'()*+,-./0123456789:;<=>?0&'()%*+#$ !"231,-.0/945687:;<=>?      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ !"#$%&'(*+,-./0123456789:;<=>R?@ABCDEFGHIJKSTUVLWMNOPQ !"()*#+,-./0123456789:;<=>R$%&'?@ABCDEFGHIJKLMNOPQXYZ[\Z[]Z[^_Z[`Z[aZ[bcdefdegdehdeidejklmnopqXY_cklrmnopqXY_cklstunopqv#intervals-0.8-PQi7iksuvK2M9Gy7guxUKNumeric.Interval.ExceptionNumeric.IntervalNumeric.Interval.InternalNumeric.Interval.KaucherNumeric.Interval.NonEmpty"Numeric.Interval.NonEmpty.InternalAmbiguousComparison EmptyInterval$fExceptionAmbiguousComparison$fShowAmbiguousComparison$fExceptionEmptyInterval$fShowEmptyInterval$fEqEmptyInterval$fOrdEmptyInterval$fDataEmptyInterval$fEqAmbiguousComparison$fOrdAmbiguousComparison$fDataAmbiguousComparisonIntervalIEmpty+/-interval...wholeemptynull singletoninfsupsingularwidth magnitude mignitudedistanceinflatedeflatescale symmetricbisectbisectIntegralmidpointmember notMemberelemnotElem intersectionhull!>=! certainlycontains isSubsetOf?>=?possiblyidoubleifloatiquotiremidivimod$fRealFloatInterval$fFloatingInterval$fRealFracInterval$fFractionalInterval$fRealInterval $fNumInterval$fShowInterval$fFoldableInterval $fEqInterval $fOrdInterval$fDataInterval$fGenericInterval$fGeneric1Intervalclamp$fDistributiveInterval$fMonadInterval$fApplicativeInterval$fTraversableInterval$fFunctorInterval increasing decreasingghc-prim GHC.Classes<<===/=!/=>>=/=?baseGHC.Realquotremdivmod realToFrac negInfinity posInfinityfmod divNonZero divPositive divNegativedivZeronansignum'periodic periodic'