Float Ulp

Inspect float neighbours, asymmetric gaps and the format’s ULP spacing.

About this tool

Enter a decimal value and choose binary32 or binary64. Results update directly after a brief typing pause; the initial example is already inspected. Empty input waits quietly and errors never move focus. A decimal comma or point is accepted, as are NaN and signed Infinity/inf. Decimal text rounds directly to binary32 without intermediate binary64 rounding; binary64 uses native Number conversion. Processing is bounded to 256 characters and finite binary64 decimal range, not arbitrary-precision arithmetic. The stored value and neighbours use enough significant digits to round-trip, not exact decimal expansions.

Next down/up move numerically toward negative/positive infinity. Both signed zeros have the smallest negative/positive subnormal as their neighbours. ULP uses the spacing of the binade of |x|; subnormal and zero spacing is constant. At the largest finite value ULP remains finite, while the next value is Infinity. Infinity has infinite ULP; NaN has no ULP. Undefined distances are shown as a dash. At powers of two, the lower and upper distances can differ by a factor of two. ULP is an absolute spacing, not a count of significant bits.

Open the optional spacing curve to calculate it; later bound or format changes update it automatically. Both axes are logarithms over positive magnitudes: exponent boundaries produce vertical steps and the subnormal region is flat. Choose finite positive bounds inside the format range. A dot marks the magnitude of the currently stored value when finite, nonzero and inside the range; hover it for the signed value. Invalid inspected input removes only the dot and its numerical result, not the independent curve. Invalid bounds clear only the curve. Reset restores all four default inputs. Bit representation shows sign, exponent, fraction in groups of up to four bits, and hexadecimal bits; an opened bit view stays open during editing.

Special NaN bit patterns/payloads and alternative rounding modes are not modeled. Decimal input is limited to 256 characters.

The shared browser store keeps only the exact value text, selected format and both bound texts. Empty and invalid drafts are retained within 512 characters for the value and 64 per bound; the 256-character numerical-processing limit stays unchanged. No result, plot, marker or opened view is saved. After reload the value is freshly inspected and the curve stays closed until opened. A storage warning means changes may remain only in memory.