3 ms·
`0.1 + 0.2 != 0.3` is a property of all (base-2) floating-point arithmetic, no matter the precision or programming language.
by smitherfield 9y ago
`0.1 + 0.2 != 0.3` is a property of all (base-2) floating-point arithmetic, no matter the precision or programming language.
- estomagordo 9y agoWell yeah, but this was 0.1 + 0.2 != 0.15 + 0.15, and there's no obvious reason why 0.15 + 0.15 = 0.3 imo.
- philh 9y agoI interpreted their comment as "here's an example that will always work", and I appreciated it in that light.