| ▲ | sluukkonen an hour ago | |
It’s easier just to use a proper decimal type than to remember all of the ways where using floats will bite you in the ass. The behavior is unintuitive even in trivial examples. Code like
will print “OUTSTANDING”. | ||
| ▲ | adrian_b an hour ago | parent [-] | |
True, but those who do not use decimal floating-point numbers do not use such binary floating-point numbers. They use binary fixed-point numbers/integers, where such computations are exact, while not having the huge computational overhead of decimal floating-point numbers. | ||