Rounding for symmetric
Open
- Dominant language
- Haskell
- Stars
- 35
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.