docs(science): add mathematical basis and clarify numerical guarantees - #187
Conversation
- define the binary64, factorization, determinant-filter, exact-arithmetic, tolerance, and error contracts - align README, API documentation, examples, and LDLT diagnostics with guarantees over stored values - audit academic references and extend Criterion coverage for determinant error-bound paths Closes#159Closes#164
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe PR adds a mathematical-basis document, revises numerical and LDLT documentation, relocates internal symmetry plumbing, expands certified determinant benchmarks, and updates compatibility-aware benchmark comparison behavior. ChangesNumerical contracts and validation
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #187 +/- ##
=======================================
Coverage 97.87% 97.87% =======================================
Files 8 8 Lines 4944 4947 +3 =======================================
+ Hits 4839 4842 +3
Misses 105 105
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/mathematical_basis.md`:
- Line 201: Update the determinant/sign test table row containing
det_direct_with_errbound so the absolute-value notation around estimate does not
create Markdown table separators; escape the pipe characters or replace the
notation with equivalent wording. Then run just markdown-check and just
markdown-fix.
In `@scripts/bench_compare.py`:
- Around line 800-816: Add a focused test covering the baseline_unavailable and
missing_current branch in the comparison flow, asserting that it emits a
CoverageGap with suite="exact", the expected group and bench identifiers,
missing_current=True, and missing_baseline=False. Reuse the existing test
fixtures and setup for policy-driven baseline-unavailable scenarios.
In `@src/ldlt.rs`:
- Around line 27-37: Update the public LDLT documentation near
`factor_symmetric` and `Matrix::ldlt` to distinguish zero-pivot errors: an
uncoupled zero pivot returns `LaError::Singular`, while a zero pivot with
non-zero remaining coupling returns `LaError::NotPositiveSemidefinite`; retain
the existing tolerance-small positive pivot behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fd400d48-79b9-483b-941c-c2758d07ab1f
📒 Files selected for processing (23)
CONTRIBUTING.mdREADME.mdREFERENCES.mdbenches/common/exact.rsbenches/exact.rsbenches/vs_linalg.rsdocs/BENCHMARKING.mddocs/mathematical_basis.mdexamples/exact_det_3x3.rsexamples/exact_sign_3x3.rsexamples/exact_solve_3x3.rsjustfilescripts/bench_compare.pyscripts/tests/test_bench_compare.pysrc/error.rssrc/exact.rssrc/ldlt.rssrc/lib.rssrc/lu.rssrc/matrix.rstests/exact_bench_config.rstests/vs_linalg_inputs.rstypos.toml
💤 Files with no reviewable changes (1)
- src/lib.rs
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- State the determinant sign condition without ambiguous Markdown delimiters. - Distinguish singular zero pivots from coupled zero-pivot LDLT rejections. - Align citation and contributor guidance with the positive-definite domain.
Uh oh!
There was an error while loading. Please reload this page.
Closes#159
Closes#164
Summary by CodeRabbit
Documentation
Bug Fixes
Tests