packages feed

roots 0.1.1.0 → 0.1.1.1

raw patch · 3 files changed

+11/−6 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Math.Root.Finder.Bisection: instance (Fractional a, Ord b, Num b) => RootFinder Bisect a b
+ Math.Root.Finder.Bisection: instance (Fractional a, Eq a, Ord b, Num b) => RootFinder Bisect a b
- Math.Root.Bracket: bracket :: (Fractional a, Num b, Ord b) => (a -> b) -> a -> a -> [(a, a)]
+ Math.Root.Bracket: bracket :: (Fractional a, Eq a, Num b, Ord b) => (a -> b) -> a -> a -> [(a, a)]
- Math.Root.Bracket: brackets :: (Eq a, Num b) => (a -> b) -> (a, a) -> Bool
+ Math.Root.Bracket: brackets :: (Eq a, Eq b, Num b) => (a -> b) -> (a, a) -> Bool
- Math.Root.Bracket: subdivideAndBracket :: (Num b, Fractional a, Integral c) => (a -> b) -> a -> a -> c -> [(a, a)]
+ Math.Root.Bracket: subdivideAndBracket :: (Num b, Eq b, Fractional a, Integral c) => (a -> b) -> a -> a -> c -> [(a, a)]

Files

roots.cabal view
@@ -1,5 +1,5 @@ name:                   roots-version:                0.1.1.0+version:                0.1.1.1 stability:              experimental  cabal-version:          >= 1.6@@ -14,10 +14,15 @@ synopsis:               Root-finding algorithms (1-dimensional) description:            Framework for and a few implementations of                         (1-dimensional) numerical root-finding algorithms.+                        .+                        Changes in 0.1.1.1: Added Eq contexts where necessary to+                        build on GHC 7.4  tested-with:            GHC == 6.8.3,                         GHC == 6.10.4,-                        GHC == 6.12.1, GHC == 6.12.3+                        GHC == 6.12.1, GHC == 6.12.3,+                        GHC == 7.0.4, GHC == 7.2.2,+                        GHC == 7.4.1-rc1  source-repository head   type: git
src/Math/Root/Bracket.hs view
@@ -3,7 +3,7 @@  -- |Predicate that returns 'True' whenever the given pair of points brackets -- a root of the given function.-brackets :: (Eq a, Num b) => (a -> b) -> (a,a) -> Bool+brackets :: (Eq a, Eq b, Num b) => (a -> b) -> (a,a) -> Bool brackets f (x1,x2)     | x1 == x2  = f x1 == 0     | otherwise = signum (f x1) /= signum (f x2)@@ -12,7 +12,7 @@ -- this function expands the range geometrically until a root is bracketed by  -- the returned values, returning a list of the successively expanded ranges.   -- The list will be finite if and only if the sequence yields a bracketing pair.-bracket :: (Fractional a, Num b, Ord b) =>+bracket :: (Fractional a, Eq a, Num b, Ord b) =>            (a -> b) -> a -> a -> [(a, a)] bracket f x1 x2     | x1 == x2  = error "bracket: empty range"@@ -32,7 +32,7 @@ -- [x1,x2], subdivide the interval into n equally spaced segments and search  -- for zero crossings of the function.  The returned list will contain all  -- bracketing pairs found.-subdivideAndBracket :: (Num b, Fractional a, Integral c) =>+subdivideAndBracket :: (Num b, Eq b, Fractional a, Integral c) =>                        (a -> b) -> a -> a -> c -> [(a, a)] subdivideAndBracket f x1 x2 n =      [ (x1, x2)
src/Math/Root/Finder/Bisection.hs view
@@ -11,7 +11,7 @@ data Bisect a b = Bisect { _bisX :: !a, _bisF :: !b , _bisDX :: !a }     deriving (Eq, Ord, Show) -instance (Fractional a, Ord b, Num b) => RootFinder Bisect a b where+instance (Fractional a, Eq a, Ord b, Num b) => RootFinder Bisect a b where     initRootFinder f x1 x2         | f1 < 0    = Bisect x1 f1 (x2-x1)         | otherwise = Bisect x2 f2 (x1-x2)