Skip to main content

The constants

Everything Zeq computes is anchored to three values. They are defined once, in shared/api-core/src/lib/zeq-kernel-constants.ts, and that file is the single source of truth for the runtime. Two other copies — the public SDK (@zeq/sdk) and the Python daemon — must declare the same primitive values, and a parity test fails the build if they ever drift.

The three values

// Zeqond duration in integer nanoseconds. EXACT. The source-of-truth primitive.
export const ZEQOND_NS: bigint = 777_000_777n;

// KO42 amplitude-modulation coefficient. EXACT. |α·sin| ≤ 0.1% by construction.
export const ALPHA_K: number = 1e-3;

// Derived — mechanically, so they cannot drift from the primitive:
export const TAU_ZQ: number = Number(ZEQOND_NS) / 1e9; // 0.777000777 s
export const F_H: number = 1e9 / Number(ZEQOND_NS); // ≈ 1.287000000001287 Hz
SymbolMeaningValue
τ (ZEQOND_NS / TAU_ZQ)The Zeqond — the framework's unit of time777,000,777 ns = 0.777000777 s, exact
f_H (F_H)The HulyaPulse frequency — the system clock's heartbeat10⁹ / 777,000,777 Hz1.287000000001287 Hz
α (ALPHA_K)The KO42 modulation coefficient10⁻³, exact

They are definitional, not measured

This is the most important thing to understand about the constants, and the place earlier versions of the framework got it wrong.

τ is defined to be exactly 777,000,777 nanoseconds — the way the SI second is defined by a count of caesium transitions, not derived from something more fundamental. The framework does not measure the Zeqond; it declares it. An earlier published derivation expressed f_H as c / λ_φ (a wavelength argument); that derivation has been withdrawn by erratum (see CONSTANTS-CHARTER.md). The honest statement is simpler: f_H is defined as 1/τ, and the wavelength story is not load-bearing.

Because f_H and τ are reciprocals built from the same integer, their product is exactly 1 in exact arithmetic:

f_H · τ = (10⁹ / ZEQOND_NS) · (ZEQOND_NS / 10⁹) = 1 (exactly, in ℚ)

In IEEE-754 doubles the product is 1.0 ± 1 ulp (~2.2 × 10⁻¹⁶), and the module asserts this at load time outside production — if f_H · τ ever deviates by more than 10⁻¹⁵, the process refuses to start. The same self-check pins ZEQOND_NS === 777_000_777n (catching the legacy 777_777_777 typo) and ALPHA_K ≤ 0.001.

Display values vs runtime values

There is a deliberate, documented split between the numbers used in computation and the numbers shown in UI strings:

export const DISPLAY = Object.freeze({
F_H_HZ: 1.287, // rounded HulyaPulse frequency, for display
TAU_ZQ_S: 0.777, // rounded Zeqond period, for display
ALPHA_K: 0.00129, // the published Zeq-paper α (≈ 1.29 × 10⁻³)
ALPHA_K_RUNTIME: 0.001,
KERNEL_VERSION: "1.287.6",
});

Two things to note, because they look like contradictions and are not:

  • f_H displays as 1.287 Hz but computes as 1.287000000001287 Hz. The display value is the rounded representation; the runtime value is the exact rational. They are not algebraically equal, and the code says so explicitly.
  • α is 10⁻³ at runtime but 1.29 × 10⁻³ in the published equation. These are two different quantities that happen to share a name. The runtime ALPHA_K = 10⁻³ is the coefficient that makes the modulation bounded by construction to 0.1%. The display 0.00129 is the value printed in the Zeq paper's symbolic R(t) equation, preserved for continuity with the literature. A third, separate, unrelated α_econ = 1.29 × 10⁻³ lives in the economy config — never conflate it with either of these.

The precision bound is built into α

ALPHA_K = 10⁻³ is not enforced by a runtime guard that clamps a wandering value. It is chosen so that the modulation term α·sin(2π·f_H·t) can never exceed 0.1% in magnitude, because |sin| ≤ 1 and α = 10⁻³. The ≤0.1% precision bound that the VERIFY step checks is therefore a property of the constant itself, not a check that can fail silently. This is why the framework can promise a bound rather than hope for one.

1 Zeqond = 0.777 s is the anchor most people remember. The exact integer behind it, 777,000,777 ns, is the one the framework computes with.