What Every Computer Scientist Should Know About Floating-Point Arithmetic(opens in a new tab)
A tutorial on IEEE 754 floating point: how results are rounded, how relative error and units in the last place measure the rounding, why subtracting nearly equal numbers loses accuracy, and what guard digits, infinities, NaNs and denormalized numbers are for.