Joshua de Freitas
← Design
02 · Live computation · 2026

Order of addition

The same numbers, added in 220 different orders, do not give the same answer.

About

Floating-point addition is not associative: (a + b) + c need not equal a + (b + c). A graphics chip that splits a sum across many workers is choosing an order, and so is a compiler that is allowed to rearrange arithmetic.

That is why a tool that compares results across hardware has to say, before anything runs, what counts as the same.

Related: Numerical parity →

What it encodes

In the pictureMeaning
A lineOne order of the same 4,096 numbers
Left to rightProgress through the sum
Up and downDrift of the 32-bit running sum from the 64-bit one, in units in the last place of the total
Bars at the rightHow many orders ended on each answer
Acid greenThe order smallest-first

Source and method

Computed in your browser. The numbers are pseudo-random, positive, and span five orders of magnitude.

assets/js/order.js, with Math.fround for 32-bit rounding.