|
|
|
|
|
by lxgr
998 days ago
|
|
That’s not a problem by itself. You can represent 0.3 as 0.300000…0004, which rounds to 0.3 again in the end. But you need to reason about the number and nature of intermediate operations, which is tricky, since errors usually accumulate and don’t always cancel out. |
|
No, it really is the original sin here.
> since errors usually accumulate and don’t always cancel out.
The problem is that from the system's perspective, these aren't "errors". 0.3000000....4 is a perfectly valid value. It's just not the value that you want. But the computer doesn't know what you want.