Objective. Prove that theta_deg printing is deterministic across tools when using fixed digits and banker’s rounding under IEEE-754 binary64 — all plain ASCII.
Rules (must)
- Compute from UTC only:
wrap360(x) = x - 360*floor(x/360)theta_deg = wrap360( (unix_seconds / 86400) * 360 ) - Derive sector:
rasi_idx = floor(theta_deg / 30) - Print
theta_degwith exactlytheta_precfractional digits (default5) using round-half-to-even; decimal point is.; no thousands separators. - Compare the printed
theta_degas a string to the recorded field.
Steps (deterministic)
- Parse
iso_utc = "YYYY-MM-DDThh:mm:ssZ"(UTC, seconds only; reject23:59:60). - Compute
unix_seconds = seconds_since_1970_UTC(iso_utc). - Compute angles:
theta_deg = wrap360( (unix_seconds / 86400) * 360 )rasi_idx = floor(theta_deg / 30) - Format
theta_degwiththeta_precdigits using banker’s rounding (IEEE-754 binary64). - Check: the formatted string equals the recorded
theta_deg. Also requirerasi_idxequality.
Expected output (stdout, ASCII)
CLOCK_OK=true
(If a tool cannot reproduce the exact print but matches numerically within <= 0.5 * 10^(-theta_prec), you MAY flag a policy warning and fix the print logic.)
Tiny probes (suggested)
- Exact half-way case to test half-to-even (choose times where
theta_deg’s next digit is exactly5). - Near a sector cusp
theta_deg ≈ 30*kto confirmrasi_idxflips only when crossing the boundary. - Day wrap:
theta(t+1s) ≈ wrap360(theta(t) + 360/86400).
Common pitfalls (avoid)
- Printing with default locale (
,decimal) or different rounding rule. - Emitting variable digits (e.g., trimming trailing zeros).
- Using extended precision during formatting (must be binary64).
- Including subseconds in
iso_utcor any timezone offset.
Why this matters
- The Shunyaya Symbolic Mathematical Clock Stamp relies on string-equal
theta_deg. Fixed-digit, banker’s-rounded prints eliminate cross-platform drift and make anchors reproducible.
Navigation
Back: SSM-Clock Stamp – Anchor Mismatch → Root-Cause (5.7)
Next: SSM-Clock Stamp – UTC Day Boundary (continuity sanity) (5.9)