ThreeBody and Rational Dimensions

ThreeBody and Rational Dimensions

A deep look into the cheat of softening, finite-precision accumulators, and our ThreeBody astrodynamics design

November 5, 2026·Houston Haynes·32 min read

There is a myth that systems without neat analytical solutions are fundamentally unsolvable. Yet, entire industries are built on integrating these chaotic, multi-component realities. Molecular biologists routinely simulate the highly non-linear NN-body interactions of atomic forces to model targeted medication delivery. Structural engineers rely on finite-element and particle simulations to predict the cascade of sheer stress through skyscrapers. Aviation relies on millions of interacting fluid cells to keep aircraft aloft. In all of these fields, “mathematical non-integrability” is simply a given, a theoretical constraint bypassed entirely by rigorous numerical approximation.

In the specialized world of aerospace, flight and mission-control teams propagate multi-body trajectories every day. Cislunar near-rectilinear halo orbits, station-keeping maneuver plans, resonant Jovian moon tours, and low-energy ballistic transfers all live in multi-body gravitational fields. When popular accounts call ’the three-body problem’ intractable they conflate non-integrability with numerical intractability. Bruns’s theorem rules out additional independent algebraic first integrals beyond the ten classical ones in the spatial Newtonian problem: total energy HH, three components of linear momentum P\mathbf{P}, three of angular momentum L\mathbf{L}, and three center-of-mass integrals. Poincaré’s non-existence results concern additional analytic integrals under their stated perturbative hypotheses rather than placing a blanket prohibition on every analytic representation of a solution. After fixing center-of-mass motion, the remaining classical integrals are HH and the three components of L\mathbf{L} in space, or HH and LzL_z in a plane. Operational ground software integrates the equations routinely, provided the engineer is honest about force-model assumptions, close-approach singularities, step truncation, and finite-precision rounding.

Keep that last condition in mind: honesty about models, singularities, and rounding is a central takeaway of this piece.

N-body

At Braidpoint, we started the ThreeBody project as a concrete astrodynamics and compiler verification testbed for the Clef programming language and Composer compiler. With that, the ThreeBody project and the rational measure-exponent extension described below remain active design work. Writing the design down at full mathematical resolution forces our numerical, physical, and type-level commitments to apply rigor in layers before we lay claim to any result.

This is a deep cut, as they say, written primarily with two readers in mind: generalist software engineers curious how type systems and custom silicon handle nasty numerical edge cases, and specialists who wrestle with complex domains such as astrodynamics. Working through the hardest cases in the compiler and their result at runtime is how we make demanding numeric domains approachable, if not routine, across a wide variety of high-precision workloads. For the next several sections, the treatment is unapologetically mathematical with a few signposts along the way.

To begin, we consider NN point masses with positions qi∈Rd\mathbf{q}_i \in \mathbb{R}^d (d∈{2,3}d \in \{2, 3\}), momenta pi=miq˙i\mathbf{p}_i = m_i \dot{\mathbf{q}}_i, pairwise separations dij=qj−qi\mathbf{d}_{ij} = \mathbf{q}_j - \mathbf{q}_i, and Euclidean distances rij=∥dij∥r_{ij} = \|\mathbf{d}_{ij}\|. Their motion is governed by the Newtonian Hamiltonian H(q,p)H(\mathbf{q}, \mathbf{p}) and the exact pairwise gravitational force Fi(q)\mathbf{F}_i(\mathbf{q}) on body ii.

H(q,p)=∑i=1N∥pi∥22mi−∑1≤i<j≤NGmimjrijFi(q)=∑j≠iGmimj∥qj−qi∥3(qj−qi) H(\mathbf{q}, \mathbf{p}) = \sum_{i=1}^{N} \frac{\|\mathbf{p}_i\|^2}{2m_i} - \sum_{1 \le i < j \le N} \frac{G m_i m_j}{r_{ij}} \qquad \mathbf{F}_i(\mathbf{q}) = \sum_{j \ne i} \frac{G m_i m_j}{\|\mathbf{q}_j - \mathbf{q}_i\|^3}(\mathbf{q}_j - \mathbf{q}_i)

Our baseline ThreeBody configuration places three equal masses at the vertices of a right triangle in a two-dimensional plane (a symmetric-mass cousin of Carl Burrau’s 3-4-5 free-fall problem integrated numerically by Victor Szebehely and C. Frederick Peters in 1967) and releases them from rest, so P(0)=0\mathbf{P}(0) = \mathbf{0} and L(0)=0\mathbf{L}(0) = \mathbf{0}. Choosing characteristic scales L0L_0, M0M_0, and dynamical time T0=L03/(GM0)T_0 = \sqrt{L_0^3 / (G M_0)} with momentum scale P0=M0L0/T0P_0 = M_0 L_0 / T_0 normalizes the dimensionless coupling to G~=1\tilde{G} = 1 while preserving explicit physical units at every interface. Such cold starts can produce repeated close passages and binary-escaper outcomes, stressing the force kernel and arithmetic. The actual outcome depends on the triangle and must be established for the chosen initial data.

Anyone who has watched 3 Body Problem on Netflix will recognize dramatized variants of this chaotic dance. Three masses released from rest on a right triangle give us the clean laboratory version.

Softening: Vlasov Continua & Point Masses

Many published NN-body examples replace the Newtonian rij−3r_{ij}^{-3} force factor with a Plummer-softened pair potential energy Φε\Phi_{\varepsilon} and force kernel Fijsoft\mathbf{F}_{ij}^{\text{soft}} controlled by a length parameter ε>0\varepsilon > 0.

Φε(rij)=−Gmimjrij2+ε2Fijsoft(q)=Gmimj(∥qj−qi∥2+ε2)3/2(qj−qi) \Phi_{\varepsilon}(r_{ij}) = -\frac{G m_i m_j}{\sqrt{r_{ij}^2 + \varepsilon^2}} \qquad \mathbf{F}_{ij}^{\text{soft}}(\mathbf{q}) = \frac{G m_i m_j}{\left(\|\mathbf{q}_j - \mathbf{q}_i\|^2 + \varepsilon^2\right)^{3/2}}(\mathbf{q}_j - \mathbf{q}_i)

Across introductory NN-body demos, GPU benchmarks, and discrete-body examples, adding ε2\varepsilon^2 in the denominator often appears with no physical justification at all. When slipped in purely as a numerical crutch so close approaches do not blow up, it silently replaces Newton’s inverse-square law with a different force model whenever two bodies pass near one another.

Before throwing softening out completely, it helps to separate the one continuum setting where smoothing plays a statistical role from discrete astrodynamics where it corrupts the physics. In collisionless components of galactic and cosmological codes (GADGET, AREPO, GIZMO), simulation particles represent coarse samples of a smooth six-dimensional phase-space mass density f(q,v,t)f(\mathbf{q}, \mathbf{v}, t) rather than individual stars or spacecraft. In physical coordinates, its Newtonian mean-field evolution follows the Vlasov-Poisson equations below, where Φ\Phi denotes gravitational potential per unit mass rather than the pair potential energy Φε\Phi_{\varepsilon} above.

∂f∂t+v⋅∇qf−∇qΦ⋅∇vf=0∇q2Φ=4πG∫R3f(q,v,t) d3v \frac{\partial f}{\partial t} + \mathbf{v} \cdot \nabla_{\mathbf{q}} f - \nabla_{\mathbf{q}}\Phi \cdot \nabla_{\mathbf{v}} f = 0 \qquad \nabla_{\mathbf{q}}^2 \Phi = 4\pi G \int_{\mathbb{R}^3} f(\mathbf{q}, \mathbf{v}, t)\,d^3\mathbf{v}

When one computational particle carries 10610^6 solar masses of dark matter or stellar mass, hard scattering between neighboring tracer particles is a discretization artifact of coarse phase-space sampling. Softening reduces shot-noise fluctuations in the estimated force, trading sampling variance against force bias without simply eliminating artificial two-body relaxation (Dehnen, 2001). Hayes’s shadowing experiments found substantially shorter shadow lifetimes with insufficient softening in the configurations studied. Those results motivate choosing smoothing and resolution together when approximating a collisionless continuum rather than treating softening as a fundamental physical force law.

Point-mass astrodynamics has no such statistical excuse. Three discrete gravitating bodies in free fall, a spacecraft executing a powered perilune pass, or a resonant asteroid triplet are genuine point-mass or small-body systems rather than tracer samples of a fluid. Close encounters are the dynamics under study. Injecting ε>0\varepsilon > 0 integrates a perturbed Plummer Hamiltonian Hε=T+∑i<jΦε(rij)H_{\varepsilon} = T + \sum_{i<j}\Phi_{\varepsilon}(r_{ij}) instead of Newtonian gravity. Inside rij≪εr_{ij} \ll \varepsilon, the true rij−2r_{ij}^{-2} force magnification collapses into a linear harmonic core.

Fijsoft(q)=Gmimjε3[1−32rij2ε2+O ⁣(rij4ε4)](qj−qi)(rij≪ε) \mathbf{F}_{ij}^{\text{soft}}(\mathbf{q}) = \frac{G m_i m_j}{\varepsilon^3}\left[1 - \frac{3}{2}\frac{r_{ij}^2}{\varepsilon^2} + \mathcal{O}\!\left(\frac{r_{ij}^4}{\varepsilon^4}\right)\right](\mathbf{q}_j - \mathbf{q}_i) \qquad (r_{ij} \ll \varepsilon)

That core caps peak accelerations, alters deflection angles during flybys, and removes the singular growth of force derivatives near zero separation. Even so, the softened model remains Hamiltonian rather than introducing physical dissipation.

Hard-coding rSq + 1e-12 can also hide a change of physical model from domain checks. Because rij2+ε2≥ε2>0r_{ij}^2 + \varepsilon^2 \ge \varepsilon^2 > 0 holds everywhere on RdN\mathbb{R}^{dN}, a positivity proof for the softened denominator is valid, yet that proof establishes safety of the softened expression rather than fidelity to Newtonian point-mass gravity. The constant must also carry the same squared-length unit as rSq.

The pole at rij=0r_{ij} = 0 disappears because the force law has changed. If the program promises unsoftened gravity, that change requires a model-equivalence or error-budget check beyond denominator safety. In trajectory code, unbudgeted softening can alter a flyby’s outbound asymptote without triggering a divide-by-zero diagnostic. Addressing that gap cleanly, with both precision and execution efficiency intact, motivates how we split simulation regimes below.

Separated Regimes and Collisional Trajectories

Because no single numerical formula is valid across smooth continuum sampling, separated orbital flight, singular point-mass flybys, and physical surface impacts, our simulation plan separates non-colliding and colliding regimes explicitly as opposed to simply hiding both behind softening.

Non-Colliding Point Masses and Error-Bounded Far Fields

For non-colliding point-mass runs (Phase 1 of ThreeBody), we evaluate the exact unsoftened 1/rij31/r_{ij}^3 kernel over an explicit minimum-separation domain D(rmin⁡)\mathcal{D}(r_{\min}).

D(rmin⁡)={(q1,…,qN)∈RdN  |  min⁡1≤i<j≤N∥qj−qi∥≥rmin⁡>0} \mathcal{D}(r_{\min}) = \left\{ (\mathbf{q}_1, \dots, \mathbf{q}_N) \in \mathbb{R}^{dN} \;\middle|\; \min_{1 \le i < j \le N} \|\mathbf{q}_j - \mathbf{q}_i\| \ge r_{\min} > 0 \right\}

Without a positive lower separation bound, rij−3r_{ij}^{-3} is unbounded above, and Composer’s planned range checker under Numeric Selection must refuse fixed-scale accumulator commitment. A bound can come from a checked separation invariant or an explicit runtime guard on every force evaluation. An evaluation outside the admitted domain halts or requests a close-encounter regime instead of inventing a denominator floor. Those guards certify sampled evaluations, whereas guaranteeing separation throughout an accepted step additionally requires a continuous-trajectory bound or validated event isolation so an interior crossing cannot slip between stages.

Scaling non-colliding trajectories to large NN follows the same discipline. Our multi-body scaling design uses the Fast Multipole Method, originating with Greengard and Rokhlin and extended to adaptive trees by Carrier, Greengard, and Rokhlin. The bound below applies to the three-dimensional Newtonian kernel. For nonnegative source masses totaling McellM_{\text{cell}} inside a sphere of radius aa, and a target at center distance R>aR>a, truncating the spherical-harmonic expansion after degree pp bounds the remainder in potential per unit target mass.

∣Φ(x)−Φp(x)∣≤GMcellR−a(aR)p+1 \left| \Phi(\mathbf{x}) - \Phi_p(\mathbf{x}) \right| \le \frac{G M_{\text{cell}}}{R - a}\left(\frac{a}{R}\right)^{p+1}

A potential-error target chooses pp from this bound, including its mass and distance prefactor. Force accuracy requires a separate bound on the differentiated expansion, together with translation, summation, and rounding budgets, since the potential tolerance alone does not certify force error. In the usual adaptive FMM terminology, List V uses multipole-to-local translations, List W evaluates multipoles at targets, and List X contributes sources to local expansions. Our design targets that far-field work for vector hardware, while near-field List U evaluates neighboring sources directly. Direct evaluation retains the unsoftened kernel while still incurring finite-precision arithmetic error. Planar trajectories embedded in physical three-space retain the three-dimensional 1/r21/r^2 Newtonian force and use the three-dimensional 1/r1/r potential kernel rather than the two-dimensional logarithmic Laplace potential ln⁡r\ln r, which governs infinite line masses. Where a user genuinely intends collisionless Vlasov continuum smoothing, Plummer or spline potentials remain available as distinct force laws with their own typed parameter ε:float⟨m⟩\varepsilon : \text{float}\langle\text{m}\rangle.

Software generalists can read FMM’s List V and List U split as a classic systems pattern: batch the far field onto vector hardware, and evaluate nearby interactions directly. Ground-system engineers will recognize a related separation in conjunction screening, where bulk catalog propagation filters thousands of resident space objects down to the few close-approach pairs requiring high-fidelity evaluation.

Analytic Regularization and Finite-Radius Contact

A separation guard rij≥rmin⁡r_{ij} \ge r_{\min} keeps a non-colliding integrator honest, yet stopping at rmin⁡r_{\min} cannot propagate through a deep perilune, a resonant three-body scramble, or an actual collision. Supporting colliding and near-colliding simulations requires distinguishing two physical cases: singular point-mass encounters (Ri=0,rij→0R_i = 0, r_{ij} \to 0) and finite-radius physical contact (rij=Ri+Rj>0r_{ij} = R_i + R_j > 0).

For an isolated binary collision, or a close pair whose external perturbation remains regular, celestial mechanics removes the Keplerian pole analytically while agreeing with Newton’s law away from collision. If you have never worked with regularized astrodynamics, the core idea is surprisingly visual: we re-clock integration so physical time increments shrink with distance (dt=r dsdt = r\,ds), and lift coordinates through a quadratic map. A head-on binary collision can then continue smoothly through the origin in the lifted coordinates, whereas an ordinary non-colliding flyby stays away from that origin. Levi-Civita regularization uses complex squaring in the plane, while the Kustaanheimo-Stiefel construction lifts relative Cartesian coordinates q=q2−q1∈R3\mathbf{q} = \mathbf{q}_2 - \mathbf{q}_1 \in \mathbb{R}^3 (embedded in R4\mathbb{R}^4 with fourth component zero) to a four-parameter vector u∈R4\mathbf{u} \in \mathbb{R}^4 paired with Sundman’s fictitious time ss. This binary construction does not by itself regularize a simultaneous triple collision.

q=L(u)ur=∥q∥=∥u∥2dt=r ds \mathbf{q} = \mathcal{L}(\mathbf{u})\mathbf{u} \qquad r = \|\mathbf{q}\| = \|\mathbf{u}\|^2 \qquad dt = r\,ds

The Kustaanheimo-Stiefel (KS) linear operator L(u)\mathcal{L}(\mathbf{u}) takes the 4×44 \times 4 matrix form below.

L(u)=(u1−u2−u3u4u2u1−u4−u3u3u4u1u2u4−u3u2−u1) \mathcal{L}(\mathbf{u}) = \begin{pmatrix} u_1 & -u_2 & -u_3 & u_4 \\ u_2 & u_1 & -u_4 & -u_3 \\ u_3 & u_4 & u_1 & u_2 \\ u_4 & -u_3 & u_2 & -u_1 \end{pmatrix}

This matrix satisfies L(u)TL(u)=rI4\mathcal{L}(\mathbf{u})^T \mathcal{L}(\mathbf{u}) = r I_4. Along trajectories obeying the bilinear gauge constraint u4u1′−u3u2′+u2u3′−u1u4′=0u_4 u_1' - u_3 u_2' + u_2 u_3' - u_1 u_4' = 0 (which reduces in the planar u3=u4=0u_3 = u_4 = 0 slice to Levi-Civita’s 2×22 \times 2 matrix), it maps differentials via dq=2L(u) dud\mathbf{q} = 2\mathcal{L}(\mathbf{u})\,d\mathbf{u}.

Write (⋅)′=d/ds(\cdot)' = d/ds, let μ=G(m1+m2)\mu = G(m_1 + m_2), and, for r>0r > 0, define the pair’s osculating specific two-body energy h2=12∥q˙∥2−μr=(2∥u′∥2−μ)/rh_2 = \frac{1}{2}\|\dot{\mathbf{q}}\|^2 - \frac{\mu}{r} = (2\|\mathbf{u}'\|^2 - \mu)/r. At collision, h2h_2 is continued by its differential equation rather than evaluated as this quotient. The vector P\mathbf{P} below collects differential tidal acceleration from external bodies k≥3k \ge 3, embedded as (Px,Py,Pz,0)T(P_x,P_y,P_z,0)^T when multiplied by the 4×44 \times 4 KS matrix.

P=∑k≥3Gmk(qk−q2∥qk−q2∥3−qk−q1∥qk−q1∥3) \mathbf{P} = \sum_{k \ge 3} G m_k \left( \frac{\mathbf{q}_k - \mathbf{q}_2}{\|\mathbf{q}_k - \mathbf{q}_2\|^3} - \frac{\mathbf{q}_k - \mathbf{q}_1}{\|\mathbf{q}_k - \mathbf{q}_1\|^3} \right)

Substituting q=L(u)u\mathbf{q} = \mathcal{L}(\mathbf{u})\mathbf{u} and dt=r dsdt = r\,ds into the singular relative equation q¨=−μq/r3+P\ddot{\mathbf{q}} = -\mu\mathbf{q}/r^3 + \mathbf{P} cancels the r−3r^{-3} pole algebraically and yields the regular KS equations of motion.

d2uds2−h22 u=r2 L(u)TPdh2ds=2(u′)TL(u)TPdtds=∥u∥2 \frac{d^2\mathbf{u}}{ds^2} - \frac{h_2}{2}\,\mathbf{u} = \frac{r}{2}\,\mathcal{L}(\mathbf{u})^T \mathbf{P} \qquad \frac{dh_2}{ds} = 2(\mathbf{u}')^T \mathcal{L}(\mathbf{u})^T \mathbf{P} \qquad \frac{dt}{ds} = \|\mathbf{u}\|^2

For a bound pair (h2<0h_2 < 0) in isolation (P=0\mathbf{P} = \mathbf{0}), the equation is a linear harmonic oscillator with constant real frequency ω=−h2/2\omega = \sqrt{-h_2/2} measured against fictitious time ss. A head-on collision at u=0\mathbf{u} = \mathbf{0} (r=0r = 0) has a smooth regularized continuation with finite derivatives in ss. In our planned multi-body architecture, inspired by Aarseth’s use of regularized subsystems, actor-scheduled neighbor tracking switches eligible pairs crossing rij<rregr_{ij} < r_{\text{reg}} into regularized coordinates and restores Cartesian coordinates once they separate past hysteresis radius rexit>rregr_{\text{exit}} > r_{\text{reg}}. Simultaneous close encounters require their own subsystem treatment.

Finite-radius bodies (Ri>0R_i > 0), modeled here as spheres or enclosing keep-out volumes, follow a different branch: contact or keep-out violation occurs at rij=Ri+Rj>0r_{ij} = R_i + R_j > 0 before the point-mass pole. Within [tn,tn+1][t_n,t_{n+1}], a transversal approaching contact satisfies gij(tc)=0g_{ij}(t_c)=0 and g˙ij(tc)<0\dot g_{ij}(t_c)<0, where gij(t)=∥qj(t)−qi(t)∥−(Ri+Rj)g_{ij}(t)=\|\mathbf q_j(t)-\mathbf q_i(t)\|-(R_i+R_j). Ordinary dense-output root finding estimates tct_c, whereas certifying the earliest physical contact requires validated bracketing and dense-output error bounds. At the resolved event, rules select a mission-level response, inelastic accretion (M=mi+mjM=m_i+m_j, pM=pi+pj\mathbf p_M=\mathbf p_i+\mathbf p_j at the pair barycenter), or normal impulse exchange JJ with restitution e∈[0,1]e\in[0,1] along n^=(qj−qi)/rij\hat{\mathbf n}=(\mathbf q_j-\mathbf q_i)/r_{ij}.

J=−(1+e) mimjmi+mj ((vj−vi)⋅n^)pi+=pi−−Jn^pj+=pj−+Jn^ J = -(1 + e)\,\frac{m_i m_j}{m_i + m_j}\,\big((\mathbf{v}_j - \mathbf{v}_i) \cdot \hat{\mathbf{n}}\big) \qquad \mathbf{p}_i^{+} = \mathbf{p}_i^{-} - J\hat{\mathbf{n}} \qquad \mathbf{p}_j^{+} = \mathbf{p}_j^{-} + J\hat{\mathbf{n}}

For an approaching, frictionless spherical contact, a partially inelastic normal impulse (0≤e<10 \le e < 1) changes translational kinetic energy by ΔT\Delta T.

ΔT=−12(1−e2) mimjmi+mj ((vj−vi)⋅n^)2<0 \Delta T = -\frac{1}{2}(1 - e^2)\,\frac{m_i m_j}{m_i + m_j}\,\big((\mathbf{v}_j - \mathbf{v}_i) \cdot \hat{\mathbf{n}}\big)^2 < 0

A merger is different: replacing both translational velocities by the barycentric velocity removes 12mimjmi+mj∥vj−vi∥2\frac12\frac{m_i m_j}{m_i+m_j}\|\mathbf{v}_j-\mathbf{v}_i\|^2 from translational kinetic energy, including tangential relative motion. Its model must account separately for retained spin, internal energy, and changes in gravitational potential energy. Dissipation breaks time-reversal invariance physically rather than numerically. In our verification design, reversal diagnostics apply across conservative segments (or strictly elastic e=1e = 1 event-resolved rebounds), while dissipative collisions check linear momentum, angular momentum including spin transfer, and the appropriate energy budget. Grazing contacts, initially overlapping bodies, and simultaneous contacts need explicit event rules beyond the approaching-contact formula.

Rational Dimensions & Astrodynamics

Look closely at the physical dimensions inside the regularized KS equations above. In unregularized Cartesian coordinates, computing Euclidean distance sqrt (dx*dx + dy*dy + dz*dz) maps L2\mathsf{L}^2 back to L\mathsf{L}, staying entirely within integer unit exponents. The moment a trajectory switches into Levi-Civita or Kustaanheimo-Stiefel coordinates, fractional dimensions enter the state vector itself.

Over base dimensions of length L\mathsf{L}, mass M\mathsf{M}, and time T\mathsf{T}, the identity r=∥u∥2r = \|\mathbf{u}\|^2 with dim⁡(r)=L\dim(r) = \mathsf{L} assigns both the KS state vector u\mathbf{u} and the entries of L(u)\mathcal{L}(\mathbf{u}) the fractional dimension L1/2\mathsf{L}^{1/2}. Sundman’s differential relation dt=r dsdt = r\,ds assigns fictitious time ss dimension TL−1\mathsf{T}\mathsf{L}^{-1}. Differentiating with respect to ss gives regularized velocity u′=du/ds\mathbf{u}' = d\mathbf{u}/ds dimension L3/2T−1\mathsf{L}^{3/2}\mathsf{T}^{-1} and regularized acceleration u′′=d2u/ds2\mathbf{u}'' = d^2\mathbf{u}/ds^2 dimension L5/2T−2\mathsf{L}^{5/2}\mathsf{T}^{-2}. Every term of the perturbed KS oscillator balances cleanly in Q\mathbb{Q}-exponents.

d2uds2⏟L5/2T−2  −  12h2⏟L2T−2u⏟L1/2  =  12r⏟LL(u)T⏟L1/2P⏟LT−2dh2ds⏟L3T−3  =  2(u′)T⏟L3/2T−1L(u)T⏟L1/2P⏟LT−2 \underbrace{\frac{d^2\mathbf{u}}{ds^2}}_{\mathsf{L}^{5/2}\mathsf{T}^{-2}} \;-\; \frac{1}{2}\underbrace{h_2}_{\mathsf{L}^2\mathsf{T}^{-2}}\underbrace{\mathbf{u}}_{\mathsf{L}^{1/2}} \;=\; \frac{1}{2}\underbrace{r}_{\mathsf{L}}\underbrace{\mathcal{L}(\mathbf{u})^T}_{\mathsf{L}^{1/2}}\underbrace{\mathbf{P}}_{\mathsf{L}\mathsf{T}^{-2}} \qquad \underbrace{\frac{dh_2}{ds}}_{\mathsf{L}^3\mathsf{T}^{-3}} \;=\; 2\underbrace{(\mathbf{u}')^T}_{\mathsf{L}^{3/2}\mathsf{T}^{-1}}\underbrace{\mathcal{L}(\mathbf{u})^T}_{\mathsf{L}^{1/2}}\underbrace{\mathbf{P}}_{\mathsf{L}\mathsf{T}^{-2}}

Fractional dimensions show up across everyday astrodynamics even before regularization:

  • Gravitational root factors and vis-viva scaling: Standard gravitational parameter μ=GM\mu = GM has dimension L3T−2\mathsf{L}^3\mathsf{T}^{-2}, so μ\sqrt{\mu} carries L3/2T−1\mathsf{L}^{3/2}\mathsf{T}^{-1}. Specific angular momentum h=μph = \sqrt{\mu p} multiplies L3/2T−1\mathsf{L}^{3/2}\mathsf{T}^{-1} by semi-latus rectum root p1/2p^{1/2} (L1/2\mathsf{L}^{1/2}) to land on L2T−1\mathsf{L}^2\mathsf{T}^{-1}.
  • Keplerian period and mean motion: Orbital period T=2πa3/2μ−1/2T = 2\pi a^{3/2}\mu^{-1/2} divides L3/2\mathsf{L}^{3/2} by L3/2T−1\mathsf{L}^{3/2}\mathsf{T}^{-1} to yield T\mathsf{T}, while mean motion n=μ1/2a−3/2n = \mu^{1/2}a^{-3/2} yields T−1\mathsf{T}^{-1}.
  • Universal variables: The universal anomaly χ\chi, defined through μ dt=r dχ\sqrt{\mu}\,dt = r\,d\chi, carries dimension L1/2\mathsf{L}^{1/2}. The Stumpff functions take a dimensionless argument z=αχ2z = \alpha\chi^2 (with α=1/a\alpha = 1/a of dimension L−1\mathsf{L}^{-1}), while fractional dimensions belong to prefactors such as χ\chi and χ3\chi^3 rather than to the Stumpff functions themselves.
  • Natural-unit nondimensionalization: Forming dynamical time T0=L03/2(GM0)−1/2T_0 = L_0^{3/2}(G M_0)^{-1/2} and momentum scale P0=M03/2G1/2L0−1/2P_0 = M_0^{3/2} G^{1/2} L_0^{-1/2} from separate typed factors steps directly through half-integer exponents of L\mathsf{L} and M\mathsf{M}.

Calculating the Costs of Bare Floats

After wading through spherical harmonics and four-dimensional coordinate lifts, this is a good place to come up for air and look at what all of those fractional powers mean for someone actually writing and maintaining software.

Anyone who has worked on mission software stacks knows where unit bugs bite in production. Rarely does someone design to add meters directly to seconds inside a five-line helper. Instead, mismatches hide at subsystem handoffs where units were erased to bare double[] state vectors: μ\mu passed in km3/s2\text{km}^3/\text{s}^2 into a maneuver targeter expecting m3/s2\text{m}^3/\text{s}^2, or auxiliary universal-variable and KS state arrays whose fractional dimensions could not be expressed in the host language’s unit library.

That restriction comes from the unit algebra rather than the host-language family, as libraries such as Boost.Units already support rational exponents. In the integer-exponent calculus described by Andrew Kennedy, and in the Clef Units of Measure specification being extended here, kk primitive base measures generate the free abelian group Zk\mathbb{Z}^k. Every concrete measure carries an integer exponent vector z∈Zk\mathbf{z} \in \mathbb{Z}^k, and sqrt : F<'U^2> -> F<'U> requires every exponent under the radical to be divisible by two. Taking the square root of μ:float⟨m3/s2⟩\mu : \text{float}\langle\text{m}^3/\text{s}^2\rangle or separation r:float⟨m⟩r : \text{float}\langle\text{m}\rangle fails that divisibility condition.

When an integer-exponent checker rejects a valid fractional-dimensional intermediate, a common temptation is to strip the units off, run the math on raw floats, and reattach the expected unit by assertion. The first F# function below illustrates the risk of that erasure, while the second, correct function shows our proposed Clef notation for positive semi-major axis a and gravitational parameter mu. Keplerian period specifically can keep integer units without erasure by regrouping the radicand as 2.0 * Math.PI * sqrt (a * a * a / mu) (with units s^2), and current F# itself supports rational measures. Our proposed Clef extension lets fractional-dimensional intermediates stay explicit directly as written, including KS coordinates where period-specific regrouping cannot eliminate half-integer exponents.

[<Measure>] type m
[<Measure>] type s

// F# example: explicitly strip units, losing checks in the middle
let orbitalPeriodStripped (a: float<m>) (mu: float<m^3 / s^2>) : float<s> =
    let rawA = float a
    let rawMu = float mu
    let rawT = 2.0 * Math.PI * sqrt rawMu / (rawA ** 1.5) // inverted ratio
    rawT * 1.0<s>

// Proposed Clef rational (Q) exponents: retain measured intermediates
let orbitalPeriod (a: float<m>) (mu: float<m^3 / s^2>) : float<s> =
    let rootA3 = pow_q<3, 2> a     // inferred: float<m^(3/2)>
    let rootMu = sqrt mu           // inferred: float<m^(3/2) / s>
    2.0 * Math.PI * (rootA3 / rootMu)

Look at the failure mode inside orbitalPeriodStripped: the ratio is inverted. Physically that quotient represents inverse seconds (1/s), yet once erased to bare float, multiplying by 1.0<s> stamps seconds onto the result without checking dimensional consistency. In our proposed Clef Q\mathbb{Q}-exponent version, flipping rootA3 / rootMu would infer float<s^-1>, conflicting immediately with the declared float<s> return type without an explicit annotation on either intermediate.

Why ℚ Calms the Compiler

Choosing which number system governs unit exponents is an engineering trade-off between expressiveness and what the compiler can decide automatically without pestering the programmer.

Integers (Z\mathbb{Z}) handle multiplication, division, and reciprocals (s^-1). A root of degree nn stays expressible in Z\mathbb{Z} only when every measure exponent under the radical is divisible by nn, failing whenever division leaves a non-integral result rather than because a root is odd as such. The rational numbers (Q\mathbb{Q}), ordinary fractions a/da/d reduced by greatest common divisor, sit in the sweet spot: they cover every fractional power used above and admit exact representation inside the compiler as integer pairs with zero floating-point rounding. Allowing arbitrary real exponents would additionally require a symbolic real representation and equality procedure.

Extending measure exponents from Z\mathbb{Z} to Q\mathbb{Q} upgrades the measure sort from a Z\mathbb{Z}-module (Zk\mathbb{Z}^k) to a finite-dimensional vector space Qk\mathbb{Q}^k over the rationals.

dim⁡(x)=∏j=1kbjqjq=(q1,…,qk)T∈Qkqj=ajdj    (gcd⁡(∣aj∣,dj)=1,  dj>0) \dim(x) = \prod_{j=1}^{k} b_j^{q_j} \qquad \mathbf{q} = (q_1, \dots, q_k)^T \in \mathbb{Q}^k \qquad q_j = \frac{a_j}{d_j} \;\; (\gcd(|a_j|, d_j) = 1,\; d_j > 0)

Here is the pleasant surprise for language tooling: moving from Zk\mathbb{Z}^k to Qk\mathbb{Q}^k makes this equality-solving problem algebraically cleaner. For a fixed integer vector w\mathbf{w}, 2z=w2\mathbf{z} = \mathbf{w} is solvable over Z\mathbb{Z} only when every component of w\mathbf{w} is even, and general integer systems require divisibility reasoning. Over Q\mathbb{Q}, every nonzero rational coefficient is invertible. Multiplication adds exponent vectors, division subtracts them, and a statically known rational power pow_q<p, d> scales them by p/dp/d, with d>0d>0. Measure equalities in this fragment therefore form linear systems over Q\mathbb{Q}: exact Gaussian elimination decides consistency and, when consistent, yields a most-general parametric solution whose free-parameter choices describe the same solution family. That establishes principality for the measure-equality fragment itself, while surrounding language features and value-domain restrictions on roots and reciprocals carry their own separate obligations.

We are putting real care into how that algebra runs across design time and build time so developers get stronger guarantees without extra ceremony:

  • At design time (inferred intermediate measures): The proposed extension would let Clef’s checker (CCS) infer fractional units on local bindings, closures, and helper functions using these principal measure solutions. Developers would not need unit casts or manual proof hints on each intermediate, and dimensional mismatches should surface as normalized, human-readable exponents on the offending expression. Algebraic decidability guarantees that equality solving terminates, while interactive editor latency still requires implementation measurement.
  • At build time (Baker saturation): Clef’s Units of Measure architecture retains checked measures through Baker elaboration into the Program Semantic Graph (Fidelity.PSG), so range analysis, cvc5 domain checks, and accumulator-adequacy obligations can consume them. The rational extension preserves that path for fractional measures. Measures need no runtime wrapper or tag, provided erasure preserves the correspondence to checked operations, while required runtime domain guards and chosen numerical representations retain their own execution costs.

The goal is rich fractional units in the editor, checked obligations during compilation, and native arithmetic without runtime unit wrappers.

Decidable Obligations and Numeric Selection

A reader versed in formal methods might reasonably ask where the hidden proof burden sits. Unrestricted inference and proof search for rich value-dependent predicates are not generally decidable, although a dependently typed language can retain decidable checking of supplied terms (The Decidability Sweet Spot). How do we verify an unsoftened gravitational kernel and select hardware representations without requiring hand-authored proofs for every operation?

In our Decidable By Construction architecture, we avoid a monolithic dependent-type solver by organizing verification into tiers, from structural inference and local arithmetic checks to reusable domain and relational proofs. Checked mode shifts let established evidence serve as a premise in another reasoning discipline, preserving its assumptions and resource rules as proofs connect to the actual computation through lowering. We can imagine how those pieces meet in a prospective Clef pairwise encounter check. This sketch assumes rMin > 0.0<m> and finite caller-supplied bounds on positions and masses.

[<Measure>] type kg
[<Measure>] type N = kg * m / s^2

type Vec3<[<Measure>] 'u> = { X: float<'u>; Y: float<'u>; Z: float<'u> }

type EncounterRegime =
    | SeparatedForce of Vec3<N>
    | SwitchToRegularized of uNorm: float<m^(1/2)>

// Unsoftened point-mass pair check: no "+ 1e-12" hiding the pole.
// Measured quantities trigger range-coverage checks, and the r >= rMin
// guard bounds r^3 away from zero before representation selection.
let pairGravity
    (rMin: float<m>)
    (m1: float<kg>)
    (m2: float<kg>)
    (d: Vec3<m>) : EncounterRegime =
    let g = 6.67430e-11<m^3 kg^-1 s^-2>
    let rSq = d.X * d.X + d.Y * d.Y + d.Z * d.Z     // inferred: float<m^2>
    let r = sqrt rSq                                 // inferred: float<m>
    if r >= rMin then
        let scale = (g * m1 * m2) / (r * rSq)        // inferred: float<N / m>
        SeparatedForce { X = scale * d.X; Y = scale * d.Y; Z = scale * d.Z }
    else
        SwitchToRegularized (sqrt r)                 // inferred: float<m^(1/2)>

Notice that no concrete bitwidth or posit format (f64, bposit32) appears anywhere in pairGravity. Under our Numeric Selection specification, float<'u> denotes an abstract physical real quantity in source code, while concrete hardware encodings belong to Composer’s target catalog and platform boundary declarations. The design combines three mechanisms to check this example under its stated premises:

  1. Measured types trigger the range requirement: Under Numeric Selection, an unmeasured float with an unobservable range may default to IEEE f64, whereas measured quantities require a bounded interval [a, b] before format commitment. That requirement surfaces missing bounds early, even though dimensions alone do not supply numeric intervals. The proposed rational solver would separately settle the measure equalities, including float<m^(1/2)> on sqrt r.
  2. Branch guards and interval enclosures bound the pole: Under the stated premises, real arithmetic gives r * rSq >= rMin^3 > 0 in the separated branch. Because those polynomial obligations multiply variables, they belong to quantifier-free nonlinear real arithmetic (QF_NRA) rather than linear arithmetic, with sqrt rSq characterized by r >= 0 and r * r = rSq. Sound outward-rounded interval enclosures can establish useful bounds even without resolving every valid obligation, and machine realization must also account for rounding in the distance, guard, and denominator. The other branch returns a regularization request and the KS coordinate norm before evaluating the reciprocal, leaving the caller to construct a full constrained KS state from relative position, velocity, and masses with consistent gauge and energy initialization.
  3. Representation choice is finite once admissibility is checked: Range coverage alone is insufficient. Each candidate in the target catalog must satisfy the operation and error contracts, and a quire must represent every inserted product at its quantum while covering every reachable partial sum and parallel merge. The design then selects the lowest-cost admissible format under its ULP-floored error metric, failing commitment whenever no candidate qualifies. A finite catalog keeps candidate enumeration finite without making arbitrary admissibility predicates decidable.

Keeping adjacent parts of our type system distinct prevents confusion as that pipeline comes together:

  • Reciprocal units such as s−1\text{s}^{-1} already belong to Zk\mathbb{Z}^k and need no extension.
  • Rational measure exponents (Qk\mathbb{Q}^k) check dimensional homogeneity across fractional roots, KS coordinates, and universal-variable formulas, carrying measured types through Baker saturation into the program semantic graph (Proofs from Dimensional Types).
  • Negative and fractional types, discussed in A Path Less Traveled, type operational resource duals and directed channels as opposed to physical measure exponents or numerical reversibility.

The Lyapunov Horizon

Once the force law and coordinate domain are fixed, three arithmetic error mechanisms stand out within a broader error budget: coordinate subtraction, reductions, and state writeback. Force-kernel multiplication, division, and square roots also round, and time integration introduces its own truncation error alongside those three stages.

First comes pairwise coordinate subtraction dij=qj−qi\mathbf{d}_{ij} = \mathbf{q}_j - \mathbf{q}_i. By Sterbenz’s lemma, finite same-sign floating-point values x,yx,y satisfying ∣x∣/2≤∣y∣≤2∣x∣|x|/2 \le |y| \le 2|x| subtract exactly on their stored inputs, assuming the same binary format and gradual underflow. Zero cases are exact as well. Cancellation of leading bits during a close pass nonetheless exposes relative errors already accumulated in qi\mathbf{q}_i and qj\mathbf{q}_j across preceding steps.

Neither compensated summation nor a wide posit quire can reconstruct coordinate precision that vanished before the subtraction began.

Second comes non-associative reduction across squared norms dij⋅dij\mathbf{d}_{ij} \cdot \mathbf{d}_{ij}, multi-body force sums ∑j≠iFij\sum_{j \ne i} \mathbf{F}_{ij}, and energy or momentum tallies. In IEEE 754 binary64 (5353 significand bits, unit roundoff u=2−53≈1.11×10−16u = 2^{-53} \approx 1.11 \times 10^{-16}), rounding after every addition breaks associativity.

RN⁡ ⁣(RN⁡(254−254)+1)=1RN⁡ ⁣(254+RN⁡(−254+1))=0 \operatorname{RN}\!\big(\operatorname{RN}(2^{54} - 2^{54}) + 1\big) = 1 \qquad \operatorname{RN}\!\big(2^{54} + \operatorname{RN}(-2^{54} + 1)\big) = 0

Reordering force contributions across threads or tree nodes can change low-order bits. In distributed propagation pipelines, that non-associativity is one way two compute nodes replaying the same initial ephemeris with different reduction schedules can diverge on downstream maneuver targets or close-approach miss distances.

Third comes state writeback: even if an inner force sum or dot product is accumulated exactly, updating qi,n+1\mathbf{q}_{i,n+1} and pi,n+1\mathbf{p}_{i,n+1} rounds back to the working state width at the step boundary.

Our arithmetic construction and placement design compares three working-arithmetic paths with matched initial data and step sizes against a separately converged reference. The ordinary and compensated binary64 paths hold state width fixed while changing the reductions. The posit-plus-quire path changes both state representation and accumulation, so that comparison measures their combined effects:

  • Uncompensated IEEE binary64: standard double-precision evaluation with per-operation round-to-nearest-even semantics.
  • Compensated IEEE binary64 (TwoSum / Kahan-Babuška-Neumaier): double-precision state storage with compensated force, norm, and diagnostic reductions. Error-free transforms recover local addition residuals, while the completed reduction still carries a rounding-error bound and dot products require separate product-error treatment.
  • Bounded posit bposit32 (eS = 5, rS = 6) with an 800-bit quire: 32-bit bounded-regime posit state storage paired with hardware exact accumulation on an Arty A7-100T FPGA sidecar over raw Layer 2 Ethernet via an eBPF interlink.
  • Convergence-checked high-precision reference: independent integration using MPFR arbitrary-precision floating point or Arb ball arithmetic, with both step-size and working-precision refinement so reference uncertainty stays well below the comparison tolerance over the reported interval. Ball arithmetic encloses discrete arithmetic, whereas a rigorous enclosure of the continuous trajectory additionally requires validated ODE truncation and remainder bounds.

Compensated binary64 serves as a mandatory experimental control. The complete TwoSum transformation captures the exact residual of an IEEE addition in a second register under round-to-nearest, no overflow, and gradual underflow. This local identity does not make an entire compensated reduction exact: accumulating the residuals can itself round (Ogita, Rump, and Oishi, 2005).

h=RN⁡(a+b)h+ℓ=a+b(exact in R absent overflow) h = \operatorname{RN}(a + b) \qquad h + \ell = a + b \quad (\text{exact in } \mathbb{R} \text{ absent overflow})

Measuring compensated binary64 alongside uncompensated binary64 tests how much drift the reduction changes remove on commodity IEEE hardware. Attributing a posit-path improvement specifically to the quire would additionally require a control with the same posit state format and different accumulation.

On the FPGA path, our ThreeBody plan uses the bounded-posit design, which caps regime width at six bits for parallel multiplexor decoding and specifies an 800-bit fixed-point quire (25×3225 \times 32-bit words, distinct from the Posit Standard 2022 16n=51216n = 512-bit quire for posit32). Under our posit arithmetic and Numeric Selection quire-adequacy contract, let QQ contain valid finite accumulator states, excluding exceptional states such as NaR, with real denotation D:Q→RD : Q \to \mathbb{R}. Admitted insertions and merges obey these capacity-conditional accumulation and finalization identities.

D(e)=0D(insert⁡(q,x))=D(q)+xD(merge⁡(q1,q2))=D(q1)+D(q2)finish⁡(q)=RN⁡r(D(q)) D(e) = 0 \qquad D(\operatorname{insert}(q, x)) = D(q) + x \qquad D(\operatorname{merge}(q_1, q_2)) = D(q_1) + D(q_2) \qquad \operatorname{finish}(q) = \operatorname{RN}_r(D(q))

Those identities require every inserted product xkykx_k y_k to be exactly representable at the quire’s fixed-point quantum and every reachable partial sum and parallel reduction merge to stay within its signed capacity. A finite quire is not closed under unlimited real addition. Within the admitted domain, the identities make the final rounded result independent of the reduction tree for the same inserted terms. Posits concentrate fraction bits near magnitude 11 and taper toward lower precision at extreme magnitudes. Natural units place characteristic quantities near that high-precision region, even though close-encounter forces can still span many orders of magnitude.

Casual numerical implementations often leave a second gap around time discretization, evaluating gravitational forces at isolated step instants and shrinking Δt\Delta t until plots look visually settled without bounding truncation error. As a body moves from qi(tn)\mathbf{q}_i(t_n) to qi(tn+1)\mathbf{q}_i(t_{n+1}), it traverses every intermediate position along its continuous path across [tn,tn+1][t_n, t_{n+1}]. Rigorous numerical analysis bounds point-sampled discretization through smoothness and remainder estimates, and validated Runge-Kutta methods pair stage evaluations directly with continuous-step trajectory enclosures (Sandretto and Chapoutot, 2016). We begin Phase 1 with the fixed-step symmetric Störmer-Verlet (leapfrog) map ΦΔt\Phi_{\Delta t} below as a clean point-sampled baseline for isolating arithmetic and reversal effects before adding validated step enclosures.

pi, n+1/2=pi,n+Δt2Fi(qn)qi, n+1=qi,n+Δtmipi, n+1/2pi, n+1=pi, n+1/2+Δt2Fi(qn+1) \mathbf{p}_{i,\,n+1/2} = \mathbf{p}_{i,n} + \frac{\Delta t}{2}\mathbf{F}_i(\mathbf{q}_n) \qquad \mathbf{q}_{i,\,n+1} = \mathbf{q}_{i,n} + \frac{\Delta t}{m_i}\mathbf{p}_{i,\,n+1/2} \qquad \mathbf{p}_{i,\,n+1} = \mathbf{p}_{i,\,n+1/2} + \frac{\Delta t}{2}\mathbf{F}_i(\mathbf{q}_{n+1})

Two geometric properties of ΦΔt\Phi_{\Delta t} in exact real arithmetic do different jobs here (Rounding on Real Hardware). For the separable Hamiltonian above, fixed-step Verlet is symplectic: ΦΔt∗ω=ω\Phi_{\Delta t}^* \omega = \omega. Backward error analysis gives near-conservation of energy over exponentially long intervals under additional hypotheses, including an analytic Hamiltonian on the relevant domain, a sufficiently small fixed step, and a numerical orbit confined to a compact collision-free region (Hairer). Time-reversible step adaptation or dt=r dsdt = r\,ds alone does not establish symplecticity, so any adaptive or regularized scheme requires its own geometric analysis. Separately, time-symmetry under momentum negation S(q,p)=(q,−p)S(\mathbf{q}, \mathbf{p}) = (\mathbf{q}, -\mathbf{p}) gives the fixed-step map an exact inverse.

S∘ΦΔt∘S=ΦΔt−1 S \circ \Phi_{\Delta t} \circ S = \Phi_{\Delta t}^{-1}

Propagating KK steps forward to T=KΔtT = K\Delta t, negating momenta via SS (ordinary value negation -p, preserving float<kg m / s>), propagating KK more steps with the same Δt\Delta t, and applying SS again returns to the initial state in exact arithmetic, without a checkpoint tape. Mission-control teams use a related time-symmetry maneuver during orbit determination when back-propagating state estimates across tracking passes to an earlier epoch, whereas here we close a forward-and-back loop on the discrete integrator itself. Because a rounded update Φ~Δt\tilde{\Phi}_{\Delta t} can be non-injective and lack an inverse map, we define the discrete round-trip state zretz^{\mathrm{ret}} and its dimensionless return residual Rrev(T)R_{\mathrm{rev}}(T) directly.

zret=S∘Φ~ΔtK∘S∘Φ~ΔtK(z0)Rrev(T)=max⁡1≤i≤N{∥qiret−qi(0)∥L0,  ∥piret−pi(0)∥P0} z^{\mathrm{ret}} = S\circ\tilde{\Phi}_{\Delta t}^{K}\circ S\circ\tilde{\Phi}_{\Delta t}^{K}(z_0) \qquad R_{\mathrm{rev}}(T) = \max_{1 \le i \le N}\left\{ \frac{\|\mathbf{q}_i^{\mathrm{ret}}-\mathbf{q}_i(0)\|}{L_0},\; \frac{\|\mathbf{p}_i^{\mathrm{ret}}-\mathbf{p}_i(0)\|}{P_0} \right\}

That residual measures implementation irreversibility, isolating rounding only when force evaluation, reduction scheduling, events, and regime changes otherwise implement the same reversible map. An exact-arithmetic Verlet trajectory can still accumulate phase error while returning to its starting point, so Rrev(T)R_{\mathrm{rev}}(T) complements forward-accuracy bounds without replacing them.

Discussion of long-horizon error growth also benefits from separating state-variable envelopes from trajectory-error divergence, rather than assuming universal exponential blowup across every initial condition (The Lyapunov Window). Along segments remaining in D(rmin⁡)\mathcal{D}(r_{\min}) where rij≥rmin⁡>0r_{ij} \ge r_{\min} > 0, conserved energy bounds total kinetic energy and therefore speeds, giving position envelopes that grow at most linearly with time even when nearby trajectories separate rapidly inside that envelope. For trajectory error itself, established numerical analysis proves linear growth in time under suitable integrability and integrator hypotheses (Hairer), though preserving classical invariants alone does not supply those hypotheses. Conversely, chaotic hyperbolic dynamics have been proved in specific three-body regimes (Guardia et al.) without implying a uniform exponential rate for arbitrary initial data or for every step. Stepwise Grönwall-style estimates produce uniform geometric growth whenever a common amplification bound A>1A > 1 and local defect bound ρ\rho (covering truncation, force approximation, and rounding) are imposed on every step in the normalized phase-space norm, giving the recurrence below.

en+1≤Aen+ρ⟹en≤Ane0+ρ An−1A−1 e_{n+1} \le A e_n + \rho \quad \Longrightarrow \quad e_n \le A^n e_0 + \rho\,\frac{A^n - 1}{A - 1}

Over finite intervals where close-encounter stretching is empirically well modeled by E(t)≈Cε0eλtE(t)\approx C\varepsilon_0 e^{\lambda t}, a dimensionless tolerance δ>Cε0>0\delta>C\varepsilon_0>0 gives the heuristic prediction horizon below. Here λ>0\lambda>0 is an observed growth rate with units of inverse time, ε0\varepsilon_0 is an effective perturbation in the normalized norm, and CC is a dimensionless prefactor. Changing the arithmetic does not change the continuous equations, though it can shift the numerical trajectory and its measured growth rate.

Tδ≈1λln⁡ ⁣(δCε0) T_{\delta} \approx \frac{1}{\lambda}\ln\!\left(\frac{\delta}{C \varepsilon_0}\right)

Halving the effective perturbation extends this modeled horizon by roughly (ln⁡2)/λ(\ln 2)/\lambda units of physical time, or (ln⁡2)/(λT0)(\ln 2)/(\lambda T_0) dynamical-time units. An extra arithmetic bit yields that gain only while it reduces the dominant local error, before truncation, force approximation, or initial-data uncertainty sets a floor. We measure the horizon against the convergence-checked reference trajectory rather than inferring it from conserved integrals.

E(t)=max⁡1≤i≤N{∥qi(t)−qiref(t)∥L0,  ∥pi(t)−piref(t)∥P0}Tδ=inf⁡{t≥0:E(t)>δ} E(t) = \max_{1 \le i \le N} \left\{ \frac{\|\mathbf{q}_i(t) - \mathbf{q}_i^{\text{ref}}(t)\|}{L_0},\; \frac{\|\mathbf{p}_i(t) - \mathbf{p}_i^{\text{ref}}(t)\|}{P_0} \right\} \qquad T_{\delta} = \inf\{t \ge 0 : E(t) > \delta\}

Tracking barycentric momentum drift ∥∑ipi(t)∥/P0\|\sum_i \mathbf{p}_i(t)\| / P_0, angular momentum drift, and energy residual ∣H(t)−H(0)∣/∣H(0)∣|H(t) - H(0)| / |H(0)| reveals integration, force-approximation, and rounding errors. Normalizing energy drift by ∣H(0)∣|H(0)| suits this negative-energy cold start, while zero-energy trajectories require another reference scale. Yet flight-dynamics teams know the classic operational trap: along-track (in-track) phase drift. An integrator with slight period error can keep energy and momentum plots looking flat while placing a spacecraft kilometers ahead or behind in its orbital slot. Reference comparison E(t)E(t), tape-free return residual Rrev(T)R_{\mathrm{rev}}(T), and invariant drift stay separate curves in the planned ThreeBody experiments. Whenever E(t)E(t) remains at or below δ\delta across a run (where the mathematical infimum is +∞+\infty), a finite experiment reports only that no exceedance occurred over its observation window.

Using those conservation laws actively inside propagation offers a compelling Phase 2 direction beyond passive post-mortem plots, inspired by John Gustafson’s proposal to prune unit-in-the-last-place cells (uboxes) against the seven autonomous spatial invariants (P\mathbf{P}, L\mathbf{L}, and HH). Making that idea rigorous separates a heuristic rounding filter from a certified enclosure. A local [x−ulp⁡(x), x+ulp⁡(x)][x - \operatorname{ulp}(x),\, x + \operatorname{ulp}(x)] box around a stored coordinate captures representation granularity at a single step, whereas enclosing the true trajectory across multiple steps requires propagating accumulated state sets together with continuous ODE remainder bounds rather than resetting to a one-ULP neighborhood that could drop the true solution. Likewise, interval constraint tests discard provably impossible boxes, yet survival means a box has not been refuted rather than proving one point inside it satisfies all seven invariants simultaneously. Generically, where those constraints are independent, fixing P\mathbf{P}, L\mathbf{L}, and HH in 1818-dimensional spatial phase space still leaves an 1111-dimensional level set, or eight dimensions after also fixing center-of-mass position (and six in the 1212-dimensional planar problem after fixing its four autonomous invariants and center-of-mass position), so substantial uncertainty can still spread along the conservation surface.

Collapsing surviving boxes to their centroid also relinquishes the set enclosure and need not preserve nonlinear invariants such as HH or L\mathbf{L} (much as two distinct points on a circle average off the circle), requiring separate constrained correction and verification if a point restart is desired. The real experimental question for ThreeBody is whether running the same validated propagation and invariant-pruning procedure keeps certified enclosures usefully tight for longer at manageable cost, while varying pruning, quire accumulation, and bposit32 versus IEEE state width independently to measure whether posits improve certified set size, forward accuracy, or compute cost.

Once we have the foundational measurements and software tooling that demonstrate this in a 2D plane, the next steps include expanding the count, size, and placement of bodies and moving the simulation into three dimensions. That step will trigger its own round of follow-on work to keep live visualization smooth and responsive across dramatic scale changes, placing coordinated demand on GPU, NPU, and FPGA accelerator resources that we look forward to exploring, for this problem and for many others.

Physical Fidelity Without Stripping the Types

Stepping back from the equations, the engineering goal behind all of this machinery is straightforward. Teams building ground-control and mission-control software, from ephemeris propagation and orbit determination to maneuver planning and conjunction screening, should be able to keep physical laws, singularity boundaries, accumulator guarantees, and dimensional units attached to executable code through the hardest parts of the math. Stripping units down to raw double arrays at a Kustaanheimo-Stiefel transformation or hiding a Newtonian pole behind an ad hoc softening constant trades away the exact invariants that catch silent operational bugs.

ThreeBody gives us a concrete astrodynamics laboratory where every piece of that commitment has to hold together at once: unsoftened point-mass domains alongside FMM far-field error bounds, KS regularization and event-resolved contact for colliding trajectories, three working-arithmetic paths (including compensated binary64 and FPGA bposit32 quires) alongside a separately converged reference, and Q\mathbb{Q}-dimensional unification across fractional powers. As each component moves from specification into running Clef and Composer code, its curves and diagnostics will have to stand on measured reference residuals.

Readers who remember our Breaking the P vs NP Mystique entry will recognize the same engineering posture in continuous framing. Neither discrete worst-case complexity nor continuous non-integrability goes away, yet treating either theorem as a license for fatalism squanders the structure real problems actually carry. Where discrete workloads gain traction by lowering local constraints and dataflow onto matching silicon, ThreeBody keeps domain boundaries, regularizable binary encounters, rational dimensions, and conservation laws intact so each regime targets the arithmetic and hardware built for it.

Three-body astrodynamics is a highly specialized test case, yet that reach holds practical lessons across a wide array of commercial and industrial domains. None of the compiler mechanisms stressed here stay locked inside spaceflight software. Once rational dimensions, range-checked denominators, and verified accumulator placement exist in the toolchain, every Clef program inherits them:

  • Autonomous robotics, guidance, and sensor fusion: Inertial navigation and Kalman filtering combine coordinate-frame rotations with noise amplitude spectral densities such as m/Hz\text{m}/\sqrt{\text{Hz}} and angle-random-walk coefficients in rad/s\text{rad}/\sqrt{\text{s}}, keeping units intact across state estimators where frame and scaling bugs otherwise hide in untyped matrices.
  • Quantitative finance, risk, and settlement: Multi-leg derivatives pricing, Brownian-model uncertainty proportional to t\sqrt{t}, and parallel portfolio reductions face the same twin hazards ThreeBody isolates: non-associative rounding drift across millions of sums and unit mismatches across currencies, rates, and tenors.
  • Energy grids, industrial control, and multiphysics digital twins: Power-system state estimation, battery electrochemistry (where semi-infinite diffusion gives Warburg impedance proportional to (iω)−1/2(i\omega)^{-1/2}), and coupled fluid-structure solvers mix stiff local events with bulk field calculations across heterogeneous processors.
  • AI, quantum-adjacent simulation, and everyday software: Narrow-bitwidth neural and neuromorphic inference on NPUs and FPGAs depends on wide-accumulator discipline so dot products do not collapse into rounding noise, quantum circuit simulations lean on controlled phase precision, and everyday backend or embedded tooling gets zero-cost dimensional safety, supervised actor concurrency, and clean hardware targeting out of the same compiler.

Pushing against an unforgiving physical problem forces us to solve precision, typing, and hardware coordination cleanly in the Fidelity Framework. We consider this to be the honest work of advanced design made practical. It stands in contrast to the old approach of simply leaving application developers to patch around these concerns by hand. We are excited to see ThreeBody take shape, both for what its trajectories will measure directly and for the everyday engineering confidence that same foundation brings to wide variety of systems forged at the software/hardware boundary.