Loading WebAssembly module…
Every result shows both IEEE 754 (standard) and GeoNum values side-by-side.
Drift is an explicit uncertainty compartment —
unlike IEEE 754 which hides precision loss, GeoNum carries it forward transparently.
Precise (<0.5 shades) — reliable result.
Caution (0.5–1.0 shades) — accumulating error.
Unreliable (>1.0 shades) — result flagged.
Enter any JavaScript math expression. All CODATA 2018 constants are pre-loaded. Press Enter or click Evaluate. GeoNum precision is computed for every result.
| Expression | Description |
|---|---|
| hbar * c**3 / (8 * Math.PI * G * 1.989e30 * kb) | Hawking temperature (M_☉) |
| h / (me * 1e6) | de Broglie λ for 1 MeV electron |
| -13.6 / 1**2 | Hydrogen ground state (eV) |
| 2 * G * 1.989e30 / c**2 | Solar Schwarzschild radius |
| Math.sqrt(hbar * G / c**3) | Planck length |
| hbar * c / (1.602e-19 * 1e-15) | Energy at 1 fm scale (GeV) |
| sigma * 5778**4 | Solar surface flux (W/m²) |
| na * kb | Gas constant R (should = 8.314…) |
Four canonical numerical tests comparing IEEE 754, GeoNum, and MPFR-256 reference values.
MPFR-256 (256-bit multi-precision) serves as ground truth — IEEE 754 cannot validate
itself. Reference constants are embedded from external MPFR computations.
Citation:
DOI: 10.5281/zenodo.18753425
16-limb extended precision via WebGPU compute shaders. Each slot stores 16 × f32 words using Knuth two-sum error-free transforms — 384 mantissa bits per node, exceeding MPFR-256 (256 bits). Reduction runs as a parallel binary tree: O(log₂ N) depth instead of O(N) sequential, with drift tracked per pairwise operation. Requires Chrome/Edge 113+.
Source: NIST CODATA 2018. Exact values (uncertainty = 0) are defined constants since the 2019 SI redefinition. Click Copy to copy the numeric value.
| Symbol | Name | Value | Rel. uncertainty |
|---|
| Quantity | Conversion | Factor |
|---|---|---|
| 1 eV | → Joules | 1.602 176 634 × 10⁻¹⁹ J |
| 1 eV/c² | → kg | 1.782 661 921 × 10⁻³⁶ kg |
| 1 Å (ångström) | → m | 1 × 10⁻¹⁰ m |
| 1 au | → m | 1.495 978 707 × 10¹¹ m |
| 1 ly | → m | 9.460 730 473 × 10¹⁵ m |
| 1 pc | → m | 3.085 677 581 × 10¹⁶ m |
| 1 atm | → Pa | 101 325 Pa (exact) |
| 1 cal | → J | 4.184 J (exact) |
| 1 u (atomic mass) | → kg | 1.660 539 066 60 × 10⁻²⁷ kg |
| T (Kelvin → eV) | k_BT at 300 K | 0.025 852 eV |
GeoNum is a piecewise-approximate arithmetic system with first-class drift tracking. Every number carries an explicit uncertainty compartment (drift δ) that accumulates through operations — unlike IEEE 754 floating-point, which hides precision loss silently.
Formally citable at DOI: 10.5281/zenodo.18753425. MIT licensed. Source on GitHub.
Given x ∈ ℝ, x ≠ 0:
σ = sign(x)
ℓ = log₁₀|x| [IEEE 754 log10]
z = min{k : B_k > ℓ} [zone boundaries {B_k}]
W_z = B_z − B_{z−1} [zone width in log₁₀ space]
ι = (ℓ − B_{z−1}) / W_z [normalized intensity, ∈ [0,1)]
s = ⌊ι × 2047⌋ [shade — TRUNCATION, not round-to-nearest]
δ₀ = ι × 2047 − s [initial drift ∈ [0,1)]
Zone rule: values with ℓ = B_z exactly → zone z+1 (upper boundary excluded).
Rounding: floor (truncation). Systematic underestimate of up to 1/2047 shade.
ℓ_a = B_{z_a−1} + ι_a · W_{z_a} [from intensity, not shade]
ℓ_b = B_{z_b−1} + ι_b · W_{z_b}
ℓ_sum = ℓ_max + log₁₀(1 + 10^{ℓ_min − ℓ_max}) [stable log-sum-exp]
[avoids materializing 10^ℓ — overflow-safe for |ℓ| > 308]
result = GeoNum(σ · 10^{ℓ_sum})
Drift:
δ_result = δ_a + δ_b + |ι_a − ι_b| × 0.01
Alignment penalty: |ι_a − ι_b| × 0.01
Heuristic — monotone in zone separation. Factor 0.01 is a design
constant, not derived from information theory.
sum_float = a.to_f64() + b.to_f64() [IEEE 754 — no GeoNum protection]
result = GeoNum(sum_float)
δ_result = δ_a + δ_b [prior drift propagated; no cancellation penalty]
GeoNum does NOT protect the value of a near-cancellation subtraction.
What GeoNum DOES provide: if δ_a or δ_b is large, δ_result carries
that history. The relative drift δ / |result| diverges as result → 0,
correctly flagging unreliability. This is weaker than protecting the
subtraction itself.
ℓ_product = ℓ_a + ℓ_b [exact in log space — IEEE 754 double precision]
ℓ_quotient = ℓ_a − ℓ_b
δ_result = δ₀_result + 0.1 × (|δ_a| + |δ_b|)
Justification: log-space multiplication is exact to IEEE 754 double
precision — prior drift does not compound through the arithmetic itself.
The 0.1 factor is conservative headroom acknowledging that re-encoding
introduces a new δ₀. Not derived from information theory.
The zone boundary set {B_k} is domain-configurable. The core GeoNum arithmetic is the same in all cases — only the scale resolution changes.
| Config | Boundaries | Range | Use case |
|---|---|---|---|
| Lucas (default) | Lucas sequence | 10⁻³⁵ to 10³⁰ | Multi-scale physics, validated on Hawking radiation |
| Linear eV-scale | Uniform, 20 pts | 10⁻² to 10² | Atomic/molecular energy levels |
| Linear CFD | Uniform, 20 pts | 10⁻⁶ to 10³ | Fluid dynamics on regular grids |
| Sinh-compressed | Sinh spacing, 24 pts | 10⁻¹⁰ to 10² | Dense coverage near zero (transport coefficients) |
Drift δ (shade units):
δ < 0.5 — Precise. Quantization error within design tolerance.
0.5 ≤ δ < 1 — Caution. Error accumulating; verify with higher precision.
δ ≥ 1 — Unreliable. Result should not be trusted without verification.
Relative uncertainty (approximate):
u_rel ≈ (δ / 2047) × ln(10) × 100 %
The GPU Reduction tab runs a WebGPU compute shader implementing GeoNum pairwise binary tree reduction. Each node stores the value as 16 non-overlapping f32 words (384 mantissa bits) using Knuth two-sum error-free transforms (EFT).
Slot layout (80 bytes):
limbs[0..15] : f32 value = Σ limbs[i] (non-overlapping)
sign : f32 ±1.0
drift : f32 accumulated uncertainty
active : f32 1.0 = live node, 0.0 = consumed
Pairwise absorb (twosum chain):
fn absorb(a[16], b: f32):
e = b
for i in 0..16:
(a[i], e) = twosum(a[i], e) // exact — no bits lost
if e == 0: break
Tree depth: O(log₂ N) passes
Error accumulation: O(log₂ N) instead of O(N) sequential
Precision: 16 × 24 mantissa bits = 384 bits >> MPFR-256 (256 bits)
Four canonical benchmarks demonstrate GeoNum's three distinct wins over IEEE 754:
| Benchmark | Win demonstrated | IEEE 754 result | GeoNum result |
|---|---|---|---|
| 300! factorial | Range extension | Infinity (overflow) | log₁₀(300!) ≈ 614.486 (correct) |
| Hawking radiation T_H | Drift transparency | ~6.168×10⁻⁸ K (no reliability info) | Same value + drift = 0.749 shades (borderline caution) |
| Muller's recurrence | Reliability detection | 100 (silently wrong; true = 6) | 100 (also wrong) + drift = 412,608 shades (Unreliable flagged) |
| Fwd/Rev harmonic sum | Cancellation exposure | ~5.3×10⁻¹⁵ (false precision) | Different value + combined drift ≫ 1 (Unreliable exposed) |
GPU 16-limb tree (384 bits): harmonic sum of 16,384 terms agrees with Kahan reference to full displayed precision, with drift tracking confirming result reliability.
Garrett, J. (2025). GeoNum — Geometric Number System.
Zenodo. https://doi.org/10.5281/zenodo.18753425
// Encode a float to GeoNum — returns [value, drift, rel_unc_%]
gn_encode(value: f64, zone: string) → [f64; 3]
// Arithmetic (pass value+drift pairs)
gn_add(a, a_drift, b, b_drift, zone) → [f64; 3]
gn_mul(a, a_drift, b, b_drift, zone) → [f64; 3]
gn_div(a, a_drift, b, b_drift, zone) → [f64; 3]
// Array operations
gn_sum_array(values: Float64Array, zone) → [result, max_drift, rel_unc_%]
gn_product_array(values: Float64Array, zone) → [result, drift, rel_unc_%]
// Benchmarks
bench_hawking(zone) → [ieee, gn, drift, ieee_err%, gn_err%, mpfr]
bench_alternating(n, zone) → [ieee, gn, max_drift, ieee_err%, gn_err%, mpfr]
bench_muller(steps, zone) → [ieee_final, gn_final, drift, true_answer=6]
bench_cancellation(n, zone) → [ieee_diff, gn_diff, combined_drift, rel_drift]
// Physics formulas
physics_formula(name, params: Float64Array, zone) → [ieee, gn, drift, rel_unc_%]
physics_constant(name) → [value, abs_unc, rel_unc]
GeoNum is validated against IEEE 754, double-double arithmetic, and MPFR-256 reference values. The table below shows the precision hierarchy, followed by benchmark results and planned extensions.
| System | Mantissa bits | Decimal digits | Error bound per op | Drift tracking |
|---|---|---|---|---|
| IEEE 754 f64 | 53 | ~15 | ½ ulp, silent | None |
| Double-double (2×f64) | ~106 | ~31 | ~10⁻³¹, silent | None |
| MPFR-128 | 128 | ~38 | ½ ulp at 128-bit, silent | None |
| MPFR-256 | 256 | ~77 | ½ ulp at 256-bit, silent | None |
| GeoNum GPU 16-limb | 384 | ~115 | EFT-bounded per limb | Explicit (drift δ) |
GeoNum GPU precision comes from 16×f32 limbs per slot via Knuth two-sum EFT. Each f32 contributes 24 mantissa bits; non-overlapping limb representation gives 384 effective bits. MPFR-256 reference constants are embedded in the Rust benchmarks (DOI: 10.5281/zenodo.18753425).
Double-double (DD) arithmetic stores a value as two IEEE 754 doubles (hi, lo) with |lo| ≤ ½ ulp(hi), giving ~106 mantissa bits. It is silent — no drift readout.
| Property | Double-Double | GeoNum WASM | GeoNum GPU 16-limb |
|---|---|---|---|
| Precision | ~31 decimal digits | ~15 digits + drift | ~115 digits + drift |
| Range extension | No (overflows at 10³⁰⁸) | Yes (log-space) | Yes (log-space) |
| Error visibility | Silent | Drift δ per op | Drift δ per pass |
| GPU parallel | No | No | Yes — O(log₂ N) depth |
| Cancellation detection | No | Yes (§3.3) | Yes (opposite-sign penalty) |
| 300! (n>170) | Overflow | log₁₀(300!) = 614.486 | 614.486 |
| Benchmark | MPFR-256 reference | GeoNum result | Error | Drift |
|---|---|---|---|---|
| 300! (log₁₀)
300! itself overflows IEEE 754; GeoNum returns log₁₀(300!) ≈ 614.486.
The error percentage is computed against the MPFR-256 log₁₀ value and reflects zone quantization, not arithmetic failure. IEEE 754 returns Infinity.
|
614.485 876 951 563 74 | run benchmarks → | — | — |
| Hawking T_H (M=M_☉) | 6.169 873 829 × 10⁻⁸ K | run benchmarks → | — | — |
| Muller x* (true = 6) | 6.000 000 000 | run benchmarks → | — | — |
| Harmonic cancel (N=2000) | 0.000 000 000 | run benchmarks → | — | — |
The following benchmarks are not yet implemented but are identified gaps for v2:
| Category | Benchmark | Why it matters | Status |
|---|---|---|---|
| Stiff ODE | Robertson problem — 3-species kinetics, rates span 10⁻⁵ to 10¹¹ | Tests drift accumulation across timestep cycles where subtraction dominates | Planned v2 |
| Root finding | Wilkinson polynomial — roots near singular points | Near-coalescent roots expose catastrophic cancellation IEEE 754 hides | Planned v2 |
| PDE norms | Heat equation L² residual norm over 128² grid, 1000 steps | Accumulated discretization error in large sums — GPU reduction advantage | Planned v2 |
| Double-double parity | Compensated Horner evaluation of high-degree polynomial | Direct head-to-head precision comparison vs Bailey DD library | Planned v2 |