-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I think functions to compare equality should be exposed (with a digits-to-compare parameter), but exposing CReal as an instance of Eq and Ord is a little fishy, as this can break a whole bunch of the informal laws surrounding Haskell's Eq and Ord classes.
Although other types such as Float and Double break the laws of Eq, I think it would be appropriate to hold "exact" real arithmetic to a higher standard.
Data.Number.CReal> 2e-42 == (1e-42 :: CReal)
True
Data.Number.CReal> 2e-42 > (1e-42 :: CReal)
False
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels