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.
Floating-point arithmetic is much older than modern computers. The core idea — separating a number into a significand and an exponent — dates back centuries.
Before a common standard existed, every computer manufacturer invented its own floating-point format:
In 1976 Intel was designing a floating-point coprocessor (the 8087) for the upcoming 8086 processor. They hired William Kahan (University of California, Berkeley) as a consultant.
Kahan, together with a group of experts from academia and industry, created a rigorous proposal that became the IEEE 754 standard.
The standard deliberately chose binary floating-point with a denser distribution of numbers near zero (exactly what you see in the Linear scale of this visualization). This was a conscious engineering decision to favor relative accuracy and a very wide dynamic range.
IEEE 754 became one of the most successful standards in computing history. Almost every modern processor, GPU, programming language, and numerical library follows it. This is why the same floating-point calculation usually gives identical results across different machines today — something that was far from guaranteed before 1985.
William Kahan received the Turing Award in 1989 largely for his work on floating-point arithmetic and the IEEE 754 standard. He is often called “the father of floating point.”
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 — it was a deliberate design choice made by the IEEE 754 committee.
| 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 |
There is a fixed, deterministic number of values that IEEE 754 float32 can represent.
| Category | Count | Notes |
|---|---|---|
| Total possible bit patterns | 4,294,967,296 (2³²) | Every possible 32-bit combination |
| Distinct finite real numbers | 4,278,190,079 | Counting +0 and –0 as the same value |
| Finite bit patterns (incl. ±0) | 4,278,190,080 | Treating +0 and –0 as distinct |
| +Infinity and –Infinity | 2 | |
| NaN payloads | 16,777,214 | Many different NaN bit patterns |
In the closed interval [0, 1] there are exactly 1,056,964,610 distinct non-negative float32 values.
When the 8 exponent bits are all 1s and the fraction is non-zero, the value is a NaN (Not a Number). The remaining 23 bits form the payload, giving 16,777,214 different possible NaN patterns.
William Kahan wanted these bits available so software could record why a NaN was created, enabling “retrospective diagnosis” after long calculations.
The most successful modern use is NaN-boxing: dynamic language runtimes (Firefox’s SpiderMonkey, Safari’s JavaScriptCore, LuaJIT, etc.) pack pointers and type tags into the NaN payload of a 64-bit double. This lets every value in the language fit into a single 64-bit register.
1. CPU & GPU Hardware — Dedicated Floating-Point Units implement the standard in silicon.
2. Compilers — Must respect IEEE rules (or explicitly break them with flags like -ffast-math).
3. Software — Games, ML, scientific computing, finance, graphics… almost everything numerical.
Example 1 – Random numbers in [0, 1)
Example 2 – Comparing floating-point numbers
Example 3 – Denormal performance trap
Example 4 – Catastrophic cancellation