Repository navigation
sparse lu: report an exact zero pivot as LuError::NumericSingular in both backends (#132) - #147
Merged
Merged
Conversation
…both backends (#132; upstream #339) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The numeric sparse LU returned
Okfor a numerically singular matrix, and the solve then returned NaN. Upstream reported the simplicial backend (sarah-quinones/faer#339); the supernodal backend has the same defect.Closes #132.
What changes
LuError::NumericSingular { index }, the shape the upstream maintainer asked for in upstream PR sarah-quinones/faer#332 (closed unmerged). The maintainer approved it (option 1, 2026-10-29).abs1), not the modulus used by the pivot search, because a complex modulus underflows to zero for a nonzero subnormal entry.U's pivot, is exactly zero.index. Counts elimination steps in the fill-reducing column order, the same waySymbolicSingular's does.LuError; I checked tlinalg-rs, tcontract-rs and tenferro-rs.upstream-reports/faer-028-sparse-lu-numeric-singular: a standalone program that reproduces the defect onfaer0.24.4 in both backends.Provenance
I wrote the fix from the upstream report. No code comes from upstream PR #332, and nothing was posted to Codeberg.
Verification
codeberg_339: the upstream reproduction atf32,f64,c32andc64.numeric_singular_after_an_elimination_step: a 4x4 singular/nonsingular pair.nonzero_subnormal_pivot_is_not_singular.sparselibrary tests and thesparsedoctests pass.cargo +1.89.0 checkpasses.main.Okand thenx = [NaN, NaN]for both backends onfaer0.24.4.🤖 Generated with Claude Code