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 = 6.130000e+08 ( 613000000.000000) float: nearest above = 6.130001e+08 ( 613000064.000000) float: nearest below = 6.129999e+08 ( 612999936.000000) float: minimum increment = 6.400000e+01 ( 64.000000) float: minimum decrement = 6.400000e+01 ( 64.000000) double: value = 6.130000e+08 ( 613000000.000000) double: nearest above = 6.130000e+08 ( 613000000.000000) double: nearest below = 6.130000e+08 ( 613000000.000000) double: minimum increment = 1.192093e-07 ( 0.000000) double: minimum decrement = 1.192093e-07 ( 0.000000) long double: value = 6.130000e+08 ( 613000000.000000) long double: nearest above = 6.130000e+08 ( 613000000.000000) long double: nearest below = 6.130000e+08 ( 613000000.000000) long double: minimum increment = 0.000000e+00 ( 0.000000) long double: minimum decrement = 0.000000e+00 ( 0.000000)