Re:9999999999999999.0 – 9999999999999998.0
by MauranKilom on Tuesday January 08, 2019 @07:35PM
(#18861253)
Would you really want a default comparison where a == b does not imply a - b == 0?
[ Parent
| on HN ]
Re:9999999999999999.0 – 9999999999999998.0
by yoz-y on Wednesday January 09, 2019 @01:46AM
(#18862810)
I think it depends, in languages which have implicit type coercion I think that would hurt. In languages like swift, where you need to explicitly cast even an Int to Double it would be less of a footgun. I'd rather floats have some overloaded operator maybe ~=, for approximate comparison.