Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

Floating Point ULP Spacing

Estimate normal binary floating-point spacing at a specified magnitude.

Developer workspace● Runs in your browser
01 Your input
02 Your result
View or copy raw result data
FormulaAdjacent normal value spacing = 2**(Math.floor(Math.log2(magnitude))-precision+1); Relative spacing = 2**(Math.floor(Math.log2(magnitude))-precision+1)/magnitude

Made for real tasks

  • Estimate normal binary floating-point spacing at a specified magnitude.
Explore step-by-step workflows →

Worked example

Inputs

Positive magnitude
1000000 number
Significand precision including leading bit
24 bits

Expected results

Adjacent normal value spacing
0.0625 number
Relative spacing
6.25e-08 ratio

Load the example in the workspace to reproduce these results. Display rounding does not change the underlying calculation.

How to use this tool

  1. Enter positive magnitude, significand precision including leading bit in the displayed units.
  2. Calculate the scenario, then compare it with measurements before changing a system.

Try this example

{
  "magnitude": 1000000,
  "precision": 24
}

Accuracy and scope

Ideal normal binary values; excludes subnormals and exponent range limits of a particular format.

Is my data uploaded?

This tool runs locally in your browser. Input and output are not sent to a processing server. Copy or download your result before leaving the page.