Every glowing dot is a real single-precision float generated with the exact hardware formula:
Linear scale = true number line → almost all values sit extremely close to zero (the bright bar).
Log scale = position ∝ log₁₀(value) → shows that floats exist at every order of magnitude from ~10⁻³⁸ up to 1.
WebGPU: instance buffer holds every float + phase. Vertex shader maps value → screen X (linear/log) + bobbing. Fragment shader makes soft circles. Additive blending shows density.
In scientific notation a number is written as a significand (also called the mantissa) multiplied by a power of ten (or two in binary).
Value scaling: The significand carries the precision (the significant digits), while the exponent controls the magnitude (how large or small the number is). Together they let computers represent both very large and very tiny numbers with a fixed number of bits.
In IEEE 754 binary floating-point the significand is stored in normalized form (usually with a leading 1 that is implicit).
That is exactly why the formula you see in the visualization is written as (1 + mantissa) × 2exponent.
Cyan / blue points (left side) = very small floating-point numbers (close to 0).
Pink / magenta points (right side) = floating-point numbers that are relatively close to 1.0 (for example 0.5, 0.75, 0.9, 0.99, etc.).
In Linear scale you see very few pink points because almost all possible float32 values are packed tightly near zero.
In Log scale the pink points become more visible because the scale spreads out the larger magnitudes.
The dense cluster of values near zero that you see on the Linear scale is not an accident or a limitation — it was a deliberate design choice.
When the IEEE 754 floating-point standard was created in the late 1970s and early 1980s (formally standardized in 1985), the committee led by William Kahan and others carefully chose a format that prioritizes:
This is a fundamental property of any system that uses a significand + exponent representation.
| Approach | Spacing of numbers | Dynamic range | Result |
|---|---|---|---|
| Fixed-point | Uniform | Very limited | Not practical for scientific computing |
| Floating-point (IEEE 754) | Denser near zero | Extremely wide | What we use today |
The designers accepted this trade-off because in most scientific and engineering calculations, relative accuracy matters more than absolute accuracy. Having finer spacing near zero is usually more useful than having perfectly uniform spacing across the entire range.
So the bright dense bar on the left side of the Linear scale is one of the central, intentional characteristics of IEEE 754 floating-point numbers — and the reason the original question “How many floating-point numbers are in [0, 1]?” has such a surprisingly large answer.