Skip to content

Write the approved phase-1 core design into DESIGN - #11

Merged
troldal merged 2 commits into
masterfrom
claude/phase1-design
Oct 4, 2026
Merged

troldal merged 2 commits into
masterfrom
claude/phase1-design

Conversation

@troldal

@troldal troldal commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Why

Step 5 of the CLAUDE.md process for a core change. On 2026-10-04 the maintainer approved the phase-1 core design:

  • 13 decisions on phase 1's scope, which brings API-review recommendations 6, 7, 11, 12, 14 and 15 into phase 1;
  • the architect's core note, revised once after four reviews (api-ergonomics, phase-scope, C++, numerics), with all eight of its remaining implementation choices.

This PR writes that design into the DESIGN sections it changes, so that each item can be built from DESIGN alone. Nothing is built yet. Every unbuilt item carries the new status mark [phase 1, approved 2026-10-04; not built], with a "Today …" sentence wherever the code still behaves the old way.

What (docs only)

Item DESIGN What phase 1 will build
B7 (rec 14) §6.3, D7 failure::where → by, fault::evals → evaluations; nxx::best(r), with a reasoned deletion for search results
B4 (rec 15) §6.3, §6.5, §6.7 non_finite_input for every non-finite input value. The driver maps an input code that comes from inside a step to non_finite_value.
B1 (rec 6, decision 12) §6.2, §6.8, §7.2 Role-typed literals, e.g. width_tol{1e-10, nxx::rel_tolerance{1e-8}}, with the bare two-number form deleted with a reason. make(T, T) dropped, make(abs) added. width_tol{0.0, rel_tolerance{r}} for a purely relative width. brent{*tol} and its siblings rejected with a reason.
B2/B3 (rec 7) §6.4, §6.5 f's result must be a real, an integer or an expected of one. Narrowing is caught, overflow and underflow of a wider result fail in-band, and std::is_invocable_v is false instead of a hard error. The facades' parameter-width deletions are left to phase 3.
B6 (rec 12, R3) §6.6, §6.7 nxx::better_than becomes the protocol's documented customisation point and merit_of is removed. The roots order becomes total and overflow-free. A pole failure carries its estimate without the enclosure, so first_of doesn't rank a pole as best.
B5 (rec 11) §3.6, §6.10 The combinators' call operators are constrained, with reasoned deleted siblings in place of static_asserts
A1–A4 §3.5, §5.3, §6.1, §6.3 Defaults-achievable checks (static_asserts for float, double and long double; constexpr digits plus a run-time check for cpp_bin_float_50); result sizes recorded; -ffp-contract documented for consumers, not added to the interface flags; the limits stay in std::numeric_limits

Also:

  • §6.14: three new canonical calls (13–15).
  • §7.1: the deriv items recorded for phase 2.
  • §12.20: a dated entry with all decisions.
  • Appendix D: marks the items this design resolves.
  • §10.3 and PLAN: phase 1 re-estimated from 0.5–1 to 6.5–9.5 developer-days [est], and the total left for phases 1–9 from 40–61 to 46–69.5 [est].
  • CLAUDE.md and the CHANGELOG: no longer call -ffp-contract an open question.

Verification

  • docs-auditor checked every statement against the approved note, the decisions and the code at 5780276: no decision altered or invented, current-behaviour claims correct, references resolve, numbers cited or marked [est], and no project names. phase-scope-checker checked every phase mark.
  • One fix round, then the same reviewers re-checked.
  • No code changed, so no presets were run.

Next

The build follows in separate PRs, in this order: B7 → B4 → B1 → B2/B3 → B6 → B5 → A1/A2 and docs. Each is implemented, reviewed and run through all 12 presets. A nightly dispatch for the compiler floor follows once B3 exists.

🤖 Generated with Claude Code

On 2026-10-04 the user approved the phase-1 core design: 13 decisions on the
phase-1 scope (including API-review recommendations 6, 7, 11, 12, 14 and 15),
and the architect's core note, revised after four reviews, with all eight of
its remaining implementation choices. CLAUDE.md step 5 asks for the approved
design to be written into the DESIGN sections it changes, so that each item
can be built from DESIGN alone. Nothing here is built yet. Every unbuilt
item carries a new status mark, "[phase 1, approved 2026-10-04; not built]",
with a "Today ..." sentence wherever the code still behaves the old way.

- §6.2, §6.8: role-typed x_tol/width_tol literals and guides, the make set
  (make(T, T) dropped, make(abs) added), the reasoned deletions, the purely
  relative spelling width_tol{0.0, rel_tolerance{r}}, and brent{*tol} and its
  siblings rejected with a reason (§7.2).
- §6.3: failure::where -> by, fault::evals -> evaluations, nxx::best and its
  deleted overload for search results, non_finite_input for every non-finite
  input, and the driver mapping input codes from a step to non_finite_value.
- §6.4, §6.5: what f may return (callback_for_v, value_fits_v, to_scalar,
  overflow and underflow), integer returns accepted, and the facades'
  parameter-width deletions left to phase 3.
- §6.6, §6.7: nxx::better_than as the protocol's customisation point,
  merit_of removed, the total and overflow-free roots order (R3), and the
  pole payload without its enclosure.
- §3.6, §6.10: the combinators' call operators constrained, with reasoned
  deleted siblings in place of static_asserts.
- §6.14: three new canonical calls. §5.3, §6.1: -ffp-contract is documented
  for consumers, not added to the interface flags, and the limits stay in
  std::numeric_limits. §7.1: deriv items recorded for phase 2.
- §10.3 and PLAN: phase 1 re-estimated from 0.5-1 to 6.5-9.5 developer-days
  [est], and the total left from 40-61 to 46-69.5 [est]. §12.20 records the
  decisions. Appendix D marks the items this design resolves.
- CLAUDE.md and the CHANGELOG no longer call -ffp-contract an open question.

Reviewed by docs-auditor and phase-scope-checker against the note, the
decisions and the code at 5780276; their findings are applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 4, 2026 18:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The normative implementation sketches and regression specification need corrections before they guide implementation.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)
What changed in this PR

Records the approved phase-1 core design for Numerixx 2 without changing library code.

Changes:

  • Specifies planned core APIs, diagnostics, and acceptance tests.
  • Updates phase scope, estimates, and canonical calls.
  • Records the decision to leave GCC floating-point contraction flags to consumers.
File Description
docs/​redesign/​PLAN.md Updates phase-1 status, scope, and estimates.
docs/​redesign/​DESIGN.md Specifies approved changes and distinguishes them from current behavior.
CLAUDE.md Records the settled GCC contraction policy.
CHANGELOG.md Replaces the open contraction question with its decision.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/redesign/DESIGN.md Outdated
Comment thread docs/redesign/DESIGN.md Outdated
Comment thread docs/redesign/DESIGN.md Outdated
- step_fault is not noexcept. Returning the fault moves its cause, which
  may be a user type whose move constructor throws, and the library is
  exception-neutral (D10).
- The half-width reversal near the subnormal range uses explicit endpoints.
  With d = denorm_min under round-to-nearest-even, [d, 3d] has width 2d and
  half-width 2d, while [2d, 5d] has width 3d and half-width d (measured in
  double). Multiples of DBL_MIN halve exactly, so they cannot show it. The
  planned regression case uses the same endpoints.
- warm_fallback merges two failures through detail::merge, which calls
  detail::better. Its classifier therefore gains a no_better_than state,
  with a reason, a compile-fail case and a negative invocability test, and
  the combinators have 18 deleted declarations, not 17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@troldal
troldal merged commit 44c565a into master Oct 4, 2026
13 checks passed
@troldal
troldal deleted the claude/phase1-design branch October 4, 2026 19:11
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.

2 participants