-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
-- | Construct a symmetric interval.
--
-- >>> symmetric 3
-- -3 ... 3
symmetric :: Rounded TowardInf p -> Interval p
symmetric b = coerce (negate' b) ... b
But in intervals we had another test case:
-- >>> symmetric (-2)
-- -2 ... 2
I think both test cases belong, because that is (almost) the behavior of the definition for the rounded intervals too. If the negative input test case doesn't belong, then probably a test case saying that negative input is an exception does.
But I think this means that we need symmetric :: Rounded AwayFromZero p -> Interval p, right?
Metadata
Metadata
Assignees
Labels
No labels