Note on GHC
sternenseemann opened this issue · comments
sternenseemann commented
Using Double
triggers the Problem in GHC, Float
works fine (could be a precision reason, though):
Prelude> 0.2 + 0.1 :: Double
0.30000000000000004
Prelude> 0.2 + 0.1 :: Float
0.3
Erik Wiffin commented
If you send me a PR fixing this I'd be happy to merge it.
sternenseemann commented
This too general actually, applies for almost every language that has 32-bit and 64-bit floating points. Gotta add a note on exact-real though, which allows for truly precise floating point operations.
Gonna do that sometime soon™