Shared Foundations

Numerics

What finite precision does to an otherwise correct algorithm.

Colour is the family; a dashed line is the second member of it.

Drag to pan · scroll to zoom · click a node to open it
G bfloat16 bfloat16 half-precision Half Precision bfloat16->half-precision fp16's exponent range underflows small gradients catastrophic-cancellation Catastrophic Cancellation floating-point Floating-Point Arithmetic catastrophic-cancellation->floating-point condition-number Condition Number condition-number->floating-point bounds how much accuracy a result can possibly retain half-precision->floating-point half the bits, chosen for bandwidth rather than accuracy kahan-summation Kahan Summation kahan-summation->catastrophic-cancellation recovers the low-order bits each addition throws away

6 nodes

Kahan Summation

Carries a running compensation for the low-order bits lost in each addition, making the error of a long sum independent of its length. · 1965

bfloat16

Keeps float32's eight exponent bits and spends the savings on significand instead. The same range as single precision, so values that were representa… · 2018

Catastrophic Cancellation

Subtracting two nearly equal values discards the leading digits they agree on and promotes rounding error into the result. The reason a mathematicall…

Condition Number

How much a problem amplifies error in its input. Separates a badly behaved problem from a badly written algorithm, which is a distinction worth makin…

Floating-Point Arithmetic

Numbers as sign, exponent and significand, so a fixed budget of bits spans a huge range at constant relative precision. Every result below is a conse…

Half Precision

Sixteen bits: five of exponent, ten of significand. Halves bandwidth and doubles the working set that fits in cache, at a range narrow enough to matt…