the.ai

Hardware / Numerics

verified

Numerical Stability

The same formula, evaluated two mathematically identical ways, can give a right answer and a useless one. Floating point has finite precision, and the arrangement of the arithmetic decides how much of that precision survives. A great deal of the standard machinery in deep learning — subtracting the max inside softmax, keeping accumulators in higher precision than the inputs — exists for this reason and no other.

Viz primitive · budget-splitcancelled-digits = 8

cancelled-digits holds 25% of the budget; rest holds the remaining 75%.

Significant digits destroyed when nearly-equal values are subtracted, against the digits the format started with, in equal units. Drag the agreement between the operands up to watch the answer become mostly rounding error — the reason accumulators are kept wider than the multipliers feeding them.

8

Reviewed by opendroid · 2026-08-18