4 -- | epsilon is the value that will be used in all tests that require
5 -- some measure of "closeness." Increasing it will make those tests
11 -- | x almost equals y if x is within 'epsilon' of y.
12 almost_equals :: Double -> Double -> Bool
13 almost_equals x y = (abs (x - y)) < epsilon
16 (~=) :: Double -> Double -> Bool
20 -- | x is very positive if it is 'epsilon' greater than zero.
21 very_positive :: Double -> Bool
22 very_positive x = x - epsilon > 0
25 -- | Takes a list of Doubles and returns the ones which are not very
27 non_very_positive_entries :: [Double] -> [Double]
28 non_very_positive_entries = filter (not . very_positive)