Programming

In-depth guides on the code, architecture and infrastructure behind our apps.

The number 0.30000000000000004 with its last digit in orange, beside a ring of flow units around a central m³/s node and the 64 bits of 0.1

Programming11 min read

Why 0.1 + 0.2 breaks unit conversion in JavaScript

JavaScript doubles round at every step. Convert through one canonical unit, test with ULP or relative tolerance, and round only when you display.

civilDesk