r/Physics • u/Obvious-Ask-9099 • 57m ago
Question Can computational physics replace float32/float64 with exact rational and integer arithmetic to eliminate drift and guarantee conservation laws?
Hi everyone,
In computational physics, orbital mechanics, climate modeling, and fluid dynamics, we almost universally rely on IEEE-754 floating-point numbers (float32 and float64). While floats are convenient, they are inherently approximate: over multi-century orbital integrations or millions of fluid time steps, tiny rounding errors, subtractive cancellation, and hardware discrepancies accumulate—leading to silent drift, artificial mass or energy loss, and trajectories that diverge between CPUs and GPUs.
I have been exploring whether we can eliminate this drift at the mathematical foundation by rebuilding physical models purely on exact integer and rational arithmetic instead of floats. In my framework (UNIQUANT), I tested this across several physics and numerical domains (and machine-verified the core conservation and error-bound theorems in Lean 4):
- Timekeeping & Orbital Cycles: Defining an exact rational time quantum (
q = 75/1012 s),529-year (23^2) anchor cycles, bounded quadratic lunar stepping, and299 = 13 × 23rational phase lattices where specific oscillatory modes vanish identically. - Observer Geometry & Reference Frames: Deriving exact zero-point apparent accelerations (
-2 * kappa * v^2 / (1 + kappa * r)^3), orthonormal three-anchor reference triads with fullSO(3)rotational invariance, and spatial correlation bias (N_eff < N) in distributed sensor networks. - Hydrodynamics & PDE Solvers: Replacing floating-point updates with backlog-free integer volume ledgers, cancellation-free trapezoidal channel geometry, tridiagonal M-matrix integer solvers with certified
L_infinityerror bounds, and overflow-free128/256-bit multi-limb arithmetic for bit-exact CPU/CUDA execution.
My questions for the computational physicists here:
- Where do you see the practical limits of pure integer/rational arithmetic in large-scale physical simulations (e.g., strongly nonlinear PDEs or turbulence) before denominator growth or multi-limb overhead becomes prohibitive?
- Have you encountered cases in your own work where floating-point drift or CPU/GPU non-associativity caused real physical artifacts that required rethinking the underlying arithmetic?
For anyone interested in the derivations or the Lean 4 proofs, the code and repositories are here:
- Research & Code: https://github.com/joesen88/Uniquant23 (DOI:
10.5281/zenodo.24570873) - Lean 4 Formalization (
v1.0.0): https://github.com/joesen88/UNIQUANT-Formal (DOI:10.5281/zenodo.24629562)