4 ms·
Floating point arithmetics in 19 programming languages
- jsharpe 17y agofalse & true as the results are how floating point is supposed to work. It's exact for small enough integers and inexact for decimals that are not powers of 2. I don't see the problem here.
- juuser 17y agoWell, not supposed to work like that if you think it in terms of "regular" mathematics and the problem is still (some|many) programmers don't know about this problem...