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/
float: value = 1.200012e+04 ( 12000.123047) float: nearest above = 1.200012e+04 ( 12000.124023) float: nearest below = 1.200012e+04 ( 12000.122070) float: minimum increment = 9.765625e-04 ( 0.000977) float: minimum decrement = 9.765625e-04 ( 0.000977) double: value = 1.200012e+04 ( 12000.123457) double: nearest above = 1.200012e+04 ( 12000.123457) double: nearest below = 1.200012e+04 ( 12000.123457) double: minimum increment = 1.818989e-12 ( 0.000000) double: minimum decrement = 1.818989e-12 ( 0.000000) long double: value = 1.200012e+04 ( 12000.123457) long double: nearest above = 1.200012e+04 ( 12000.123457) long double: nearest below = 1.200012e+04 ( 12000.123457) long double: minimum increment = -7.762679e-13 ( -0.000000) long double: minimum decrement = 7.762679e-13 ( 0.000000)