Floating Point Precision Calculator

Calculate the nearest values around a floating point value, and get an absolute value for precision.

Floating point representations only have a finite number of possible divisions, depending on their precision. Sometimes it's useful to find out exactly what this precision is for a given value.

This tool takes any floating point value (single precision, double precision or long) and returns a table of information about its nearest available value in each direction, in each precision.

A good example is the distance from Earth to Jupiter: 928,081,020,000m. Entering that shows that single precision gives a step error of 65km by the time you"re at Jupiter"s surface - far too much for an accurate simulation. However, double precision is accurate to a tenth of a millimetre, and long double shows no meaningful step size at all.



You may also find the IEEE 754 analyser useful: http://babbage.cs.qc.cuny.edu/IEEE-754/