Skip to content

docs: add runnable examples and link interval proofs - #340

Merged
acgetchell merged 1 commit into
mainfrom
doc/327-328-examples-and-interval-proofs
Nov 9, 2026
Merged

acgetchell merged 1 commit into
mainfrom
doc/327-328-examples-and-interval-proofs

Conversation

@acgetchell

@acgetchell acgetchell commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add runnable examples for provisional column selection and interval solution enclosures, including typed fallback cases.
  • Extend the exact rational solve example to verify the same objective through prepared vectors and checked slices.
  • Link interval and rounding rustdoc to the scientific references and proofs. Update README navigation and its release link count.
  • Include the staged itoa refresh to 1.0.19 in Cargo.lock.

Validation

  • Rust tests, examples, and both doctest suites passed on macOS.
  • Full just ci passed on macOS with 1,143 Rust tests and 443 Python tests.
  • Inspected rendered rustdoc links and their reference and proof anchors.

The interval arithmetic changes are documentation-only. The examples exercise the existing APIs and the v0.5.2 benchmark evidence remains tied to its original inputs.

Closes #327
Closes #328

Summary by CodeRabbit

  • New Features
    • Added runnable examples for selecting matrix columns and solving interval linear systems.
    • Expanded the rational-system example to demonstrate exact dot products and dimension-mismatch handling.
  • Documentation
    • Updated the README and code organization guide with the new examples and clearer descriptions.
    • Expanded mathematical explanations and references for interval arithmetic and binary64 rounding.

- Show provisional column selection, interval solution enclosures and
  fallback, and exact rational objective evaluation in runnable examples.
- Link interval and rounding rustdoc to the scientific references and
  proofs, and update the README link inventory.
- Include the staged itoa 1.0.19 lockfile refresh.

Closes #327
Closes #328
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds runnable examples for column selection, interval solving, and exact rational dot products. It updates README and code-organization navigation, and revises interval and rounding documentation with references and explanations. No implementation behavior or public declarations change.

Changes: Runnable examples

Layer / File(s) Summary
Example workflows and navigation
examples/column_basis.rs, examples/interval_solve.rs, examples/rational_input_5x5.rs, README.md, docs/code_organization.md, pyproject.toml
The examples demonstrate provisional column selection, interval division and solve outcomes, and exact rational objective evaluation. README and code-organization references and example commands are updated. The README release rule’s expected match count changes from 42 to 44.

Interval and rounding documentation

Layer / File(s) Summary
Interval arithmetic and matrix documentation
src/interval.rs
Documentation adds links and explanations for interval construction, arithmetic, and rounding, and updates descriptions of matrix solve, determinant, and determinant-sign behavior.
Binary64 rounding documentation
src/rounding.rs
Documentation describes binary64 assumptions and decomposition, and explains the product and quotient comparison approaches. No implementation code changes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related PRs

Suggested labels: rust

Merge Risk: Minimal · up to 64718

The runnable examples and release-link count match their stated contracts. No issue identified here needs to be resolved before merging.

Pre-merge checks: Passed 2 · Inconclusive 2

Failed Failed checks: 2 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive Scope: directly linked issues #327 and #328 (both target v0.5.3). Both issues contain coding requirements (examples and rustdoc links). No repository inspection tool was available, so the assessment r… Provide focused evidence for the following items, then reassess:
1. examples/rational_input_5x5.rs: confirm that RationalVector::dot is called on the prepared vector and that its result is checked against the exact value 5/6, in addition to…
Out of Scope Changes check Inconclusive The changes map to the linked issues and PR objectives: new examples column_basis.rs and interval_solve.rs; the rational_input_5x5.rs extension; README and docs/code_organization.md navigation; the py… Confirm that the Cargo.lock change alters only the itoa entry, and that the refresh is authorized under the issue constraints on package and dependency changes. Assessment is pending that confirmation. No other out-of-scope change is identi…
Passed Passed checks: 2 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "docs: add runnable examples and link interval proofs" matches the main changes. The PR adds runnable examples (column_basis, interval_solve, and an extended rational_input_5x5) and links in…
Full details: Title check

Explanation

The title "docs: add runnable examples and link interval proofs" matches the main changes. The PR adds runnable examples (column_basis, interval_solve, and an extended rational_input_5x5) and links interval and rounding rustdoc to scientific references and proofs. The title does not mention the Cargo.lock itoa refresh or the pyproject release-rule update, but the objectives describe those as secondary. The title is specific and accurate, and it follows the conventional commit style.

Full details: Linked Issues check

Explanation

Scope: directly linked issues #327 and #328 (both target v0.5.3). Both issues contain coding requirements (examples and rustdoc links). No repository inspection tool was available, so the assessment relies on the PR summary and the PR description.

[#327] Runnable examples:

  • examples/column_basis.rs: Present per summary. Uses tolerance 1e-12 and 2.0. Asserts rank, selected columns [1, 3] and [1], and minor determinant 8. Notes the nonzero 2x2 minor in the partial case. Consistent with the requirement. Not confirmed: a link to the exact-certification guide, and an explicit statement that rank is provisional at zero tolerance.
  • examples/interval_solve.rs: Present per summary. Covers reciprocal and division, a solve enclosure, IntervalSolveInconclusive and IntervalRangeExhausted typed fallbacks, and error-field assertions. Not confirmed: a demonstration that zero-containing divisor rejection is distinct from an inconclusive solve.
  • examples/rational_input_5x5.rs: Summary shows a dot product equal to 5/6 with the exact solution, checked through rational_dot on borrowed slices, plus a DimensionMismatch check. Not confirmed: use of the prepared RationalVector::dot entry point, which the issue requires. Intermediate f64 avoidance is also not confirmed.
  • examples/polynomial_determinant.rs: Retained per the PR objectives. No change reported.
  • README and docs/code_organization.md: Updated per summary.
  • just examples discovery and default-feature independence: Not confirmed from the summary.

[#328] Rustdoc links:

  • src/interval.rs: Summary reports links to the mathematical basis and references for construction, rounding, division, solves, and determinant enclosures. Not confirmed: per-method links for try_from_subtraction, try_add, try_mul, try_square, try_div, try_recip, det, det_sign, and solve.
  • src/rounding.rs: Summary reports finite-input preconditions, the 2^-968 residual threshold, and integer-comparison rationale. Not confirmed: attribution to [17] (FastTwoSum), [18] (TwoProductFMA), and [9] (binary64 decomposition); the statement that TwoProductFMA does not give an error-free division residual; and the distinction between standard foundations ([14], [20], [12]) and crate-specific arguments.
  • Link anchors: The PR reports rendered-link inspection. The summary does not confirm the anchors.

No requirement is shown to be unmet. Several requirements are not established by the available evidence.

Resolution

Provide focused evidence for the following items, then reassess:

  1. examples/rational_input_5x5.rs: confirm that RationalVector::dot is called on the prepared vector and that its result is checked against the exact value 5/6, in addition to rational_dot.
  2. examples/interval_solve.rs: confirm that a zero-containing divisor rejection is demonstrated and asserted as distinct from IntervalSolveInconclusive.
  3. src/interval.rs and src/rounding.rs: confirm the per-method rustdoc links listed in #328 and the attributions to [17], [18], [9], [14], [20], and [12]. Confirm the TwoProductFMA division-residual caveat.
  4. examples/column_basis.rs: confirm the link to the exact-certification guide and the provisional-rank wording at zero tolerance.
  5. Confirm that just examples runs the new binaries under the correct feature configuration.
Full details: Out of Scope Changes check

Explanation

The changes map to the linked issues and PR objectives: new examples column_basis.rs and interval_solve.rs; the rational_input_5x5.rs extension; README and docs/code_organization.md navigation; the pyproject.toml README link-count rule (42 to 44); and documentation-only edits in src/interval.rs and src/rounding.rs. These changes are consistent with #327 and #328. The summary reports no public declaration changes.

The Cargo.lock change (staged itoa refresh to 1.0.19) matches a PR objective. However, Cargo.lock matches the ignored_files rule '!**/*.lock' and was excluded from review. Its contents cannot be inspected. Linked issue #327 states: 'Do not change package versions ... without separate authorization.' No linked issue requires or authorizes this dependency refresh. Its connection to the linked issues therefore cannot be established from reviewable evidence.

Resolution

Confirm that the Cargo.lock change alters only the itoa entry, and that the refresh is authorized under the issue constraints on package and dependency changes. Assessment is pending that confirmation. No other out-of-scope change is identified.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 86ed3a1 and 647184f.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 8

  • README.md
  • docs/code_organization.md
  • examples/column_basis.rs
  • examples/interval_solve.rs
  • examples/rational_input_5x5.rs
  • pyproject.toml
  • src/interval.rs
  • src/rounding.rs

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

@acgetchell
acgetchell marked this pull request as ready for review November 9, 2026 03:03
@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.35%. Comparing base (86ed3a1) to head (647184f).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #340   +/-   ##
=======================================
  Coverage   98.35%   98.35%           
=======================================
  Files          16       16           
  Lines        7609     7609           
=======================================
  Hits         7484     7484           
  Misses        125      125           
Flag Coverage Δ
unittests 98.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@acgetchell acgetchell self-assigned this Nov 9, 2026
@acgetchell
acgetchell enabled auto-merge November 9, 2026 03:43
@acgetchell
acgetchell merged commit 2c07c8e into main Nov 9, 2026
24 checks passed
@acgetchell
acgetchell deleted the doc/327-328-examples-and-interval-proofs branch November 9, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant