Data Entropment Labs https://entropment.com Author: Jack Kowalski Patent Pending README — Numerical Quasi-Attractor in Finite-Precision Arithmetic =============================================================== Overview -------- This code defines a deterministic numerical transformation producing a scale-dependent, highly stable floating-point invariant ("fraction"), computed as a ratio of two structured sums involving fractional powers. The construction is intentionally simple, but it exhibits a nontrivial and repeatable behavior when evaluated in finite-precision arithmetic (IEEE-754 floating point), which is *qualitatively different* from its behavior in the real numbers ℝ. The goal of this code is **not cryptography**, but the exploration of numerical structure arising from: - finite mantissa resolution, - deterministic rounding, - irreversible projection from ℝ to a discrete numeric algebra. This makes it suitable as: - a numerical stability probe, - a scale-sensitive fingerprint, - a didactic example of projection-induced structure. ------------------------------------------------------------ Definition ---------- For a given integer key `k` and a finite number of rounds `N`: Left side: L(k) = k + Σ k^(1/p) for p in even-indexed primes Right side: R(k) = sqrt(k) + Σ k^(1/p) for p in odd-indexed primes The resulting fraction is: F(k) = L(k) / R(k) The sums are truncated after `N` terms. ------------------------------------------------------------ Behavior in ℝ (Idealized Analysis) --------------------------------- In exact real arithmetic: - Both sums diverge slowly and monotonically. - The dominant terms cancel asymptotically. - The ratio F(k) → 1 as N → ∞. This convergence does not require analytic number theory or zeta-function machinery; any balanced construction with symmetric fractional powers will exhibit similar asymptotic behavior. In ℝ, the limit exists and is trivial. ------------------------------------------------------------ Behavior in IEEE-754 Floating Point ---------------------------------- In finite-precision arithmetic, the behavior changes qualitatively: 1. The ratio does **not** converge to 1. 2. After a sufficient number of rounds (typically ~1024–2048), F(k) stabilizes at a **finite, key-dependent value**. 3. Further iterations no longer change the result (numerical convergence). This stabilized value is a **quasi-attractor** induced by projection onto the floating-point lattice. Key empirical properties: - Strong dependence on key magnitude (scale). - Weak dependence on rounding mode. - High reproducibility across runs. ------------------------------------------------------------ Rounding-Mode Independence -------------------------- Changing IEEE-754 rounding modes: - round-to-nearest-even, - toward zero, - toward +∞, - toward −∞, affects the final value only at the level of ~1e-5 to ~1e-3 relative error, even after thousands of iterations. This indicates that: - the structure is *not* rounding noise, - the attractor is determined by the **global geometry of the float lattice**, - local rounding differences average out under iteration. ------------------------------------------------------------ Role of Mantissa Size --------------------- Two independent mantissas are relevant: 1. Mantissa of the **key representation**. 2. Mantissa of the **floating-point arithmetic**. Important regimes: - If the key mantissa is comparable to or larger than the FPU mantissa, nearby integer keys produce distinct fractions. - If the FPU mantissa significantly exceeds the key mantissa, distinct keys can collapse onto the same fraction (true numerical collisions). Thus, collision behavior is not mysterious — it is a direct consequence of projection from a higher-resolution space into a lower-resolution one. ------------------------------------------------------------ Why So Many Iterations? ---------------------- Iterations serve to: - drive the computation beyond the local influence of initial rounding, - allow projection effects to accumulate, - reach the stable orbit of the numerical system. The required iteration count scales with mantissa size and key magnitude. Stopping earlier yields transient values, not the attractor. ------------------------------------------------------------ Geometric Intuition ------------------- Geometrically, the construction can be viewed as: - two slowly tightening logarithmic spirals in ℝ, - whose ratio tends to 1 in the continuous limit, - but whose discrete projections land on a stable orbit in floating-point space. The attractor is not a fixed point in ℝ, but a fixed **orbit under projection**. ------------------------------------------------------------ What This Is NOT ---------------- This function does NOT claim: - cryptographic collision resistance, - uniform randomness, - security under adversarial models, - independence from machine architecture. It should not be labeled or marketed as encryption. ------------------------------------------------------------ What This IS ------------ This is: - a deterministic numerical transformation, - operating in a non-field algebra with: - finite resolution, - NaN and ±∞, - non-invertibility, - exhibiting stable, scale-sensitive structure. The observed behavior arises from the algebra itself, not from implementation bugs or randomness. ------------------------------------------------------------ Interpretation -------------- In ℝ, the limit exists and is trivial. In floating-point arithmetic, the limit is replaced by a stable projection. This illustrates a general principle: Deterministic + finite resolution + projection ⇒ apparent irreversibility without randomness. ------------------------------------------------------------ Intended Use ------------ - Numerical experiments. - Studying projection-induced invariants. - Exploring alternative algebraic intuitions. - Educational demonstrations of finite-precision effects. ------------------------------------------------------------ Final Note ---------- This code treats floating-point arithmetic as a **first-class algebraic structure**, not as a flawed approximation of ℝ. If one insists on interpreting it through the lens of ideal real analysis, the behavior appears anomalous. If one accepts the algebra actually being used, the behavior is expected.