Skip to content

blog: "Closing the other half" — the sequel to One ulp of doubt - #138

Open
avrabe wants to merge 2 commits into
mainfrom
blog/closing-the-other-half
Open

blog: "Closing the other half" — the sequel to One ulp of doubt#138
avrabe wants to merge 2 commits into
mainfrom
blog/closing-the-other-half

Conversation

@avrabe

@avrabe avrabe commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Follow-up to One ulp of doubt, which ended by publishing what we had not proven — the approximation layer of the f32 sine kernel. That debt is now paid, and the paying was the story.

What it covers

  1. The tool didn't work. Coq-Interval was listed in our build rules but its dependency closure (mathcomp/bignums/hierarchy-builder/coq-elpi) was never wired — Require Import Interval.Tactic failed. Fixed, with the transferable lesson: the test has to use the tactic, not just check the package downloaded.
  2. The proof, with teeth. |P(r) − sin r| ≤ 1e-8, kernel-checked; coefficients copied verbatim from the Gappa proof (the reason the two halves compose at all); the bound fails at 8e-9, so it isn't vacuous.
  3. The compiler said no. jess's per-stage lowering run found an f32.convert_i64_u blocking three stages and suggested a source-level narrowing. The diagnosis was exact — but the workaround failed four different ways, verified by disassembling the built component each time. We reported the negative result the same day instead of claiming an unblock we hadn't achieved.
  4. Cosine is 10× better than sine (1e-9 vs 1e-8) — because cos_poly carries the exact 1 − 0.5·z terms and only fits the residual. A real result made visible by both numbers coming from the same machine-checked process.

Honest boundary maintained

Four bounds now proven (sine/cosine × rounding/approximation), but the post is explicit that two proven halves are not a composition — the triangle-inequality lemma and the argument-reduction cancellation are still open. That distinction is the easiest thing to blur and the most flattering to blur, so it gets its own callout.

Checks

  • zola build --drafts: 40 pages, 0 orphans, clean.
  • Cross-link /blog/one-ulp-of-doubt/ verified live (HTTP 200) and resolves in the build.
  • Frontmatter follows CONTRIBUTING: draft = true + ready = true + date = 2026-07-30 → auto-publishes on the date.

🤖 Generated with Claude Code

Ralf Anton Beier and others added 2 commits July 29, 2026 06:52
The previous post ended by publishing what we had NOT proven: the approximation
layer of the f32 sine kernel. This closes that debt, and the closing was more
interesting than the result.

Three beats, all grounded in what actually happened:
- The tool didn't work. Coq-Interval was "in the build" but its dependency
  closure was never wired, so `Require Import Interval.Tactic` failed. Fixed,
  plus the lesson: the test must USE the tactic, not just fetch the package.
- The compiler said no. A neighbouring team's per-stage lowering run found a
  64-bit-to-float conversion blocking three stages, with a suggested source-level
  workaround. Diagnosis was exact; the workaround failed four different ways,
  verified by disassembling the output each time. We reported the negative result
  the same day rather than claim an unblock we hadn't achieved.
- The cosine is 10x more accurate than the sine (1e-9 vs 1e-8) — because its
  kernel carries the exact `1 - 0.5z` terms and only fits the residual.

Keeps the honest boundary the first post established: four bounds now proven,
but the COMPOSITION of the two halves and the argument-reduction cancellation
are still open, and the post says so plainly.

Scheduled (draft + ready) for 2026-07-30. Site builds clean; the cross-link to
/blog/one-ulp-of-doubt/ resolves (verified live, HTTP 200).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG
…e in-flight claim

Publish immediately rather than schedule: date -> 2026-07-29, draft -> false,
ready stays true (file renamed to match).

Because it now goes live TODAY, one claim had to be made exactly true as of
today: the cosine APPROXIMATION bound is proven and CI-green but its PR
(relay#320) has not merged yet, so the four-bounds table would have overstated
by one cell. Footnoted as "landing, not landed" rather than rounded up — which
is the same discipline the post itself is about. The cosine ROUNDING bound is on
main and needs no qualifier.

zola build (no --drafts): 38 pages, 0 orphans, renders as published and appears
on the blog index.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HvusAXYbHLyv3uTzfBcMbG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant