Repository navigation
DefaultGEig: drop the infinite eigenvalues of a singular B that rounding makes finite - #366
Merged
rveltz merged 1 commit intoOct 29, 2026
Conversation
…ing makes finite With a singular B, LAPACK returns beta at rounding level instead of zero, so an infinite eigenvalue came back as a finite 1e17-1e19 of random sign. A positive one counted as unstable and created spurious bifurcation points. gev now drops a pair when |B v|_1 <= n eps |B|_1 |v|_1: an exact pair has |beta| / |alpha| = |B v| / |A v|. Claude-Session: https://claude.ai/code/session_015sE9Latuiqsp6zSHQ1cshz
This was referenced Oct 27, 2026
Member
|
Thank you for this. |
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.
test_wave.jlreports a different list of special points on each run for the same travelling-wave branch, and the point that line 198 continues as a fold is typed:hopfon some runs and:ndon others. The branch itself is the same on every run, with the same parameters and finite eigenvalues at each step, but at random steps the spectrum has one more eigenvalue of about 1e17 to 1e19. That eigenvalue is the infinite eigenvalue of the pencil(J, B)withB = diag(1, …, 1, 0): LAPACK returns itsβat rounding level instead of exactly zero, soα / βis finite, with a random sign.gev(::DefaultEig, A, B, nev)dropped only non-finite values, so a positive one was counted as unstable and created a spurious bifurcation point; the existing test attest_linear.jl:720checks onlyall(isfinite), which such an eigenvalue passes. This PR drops an eigenpair(λ, v)when‖B v‖₁ ≤ n eps ‖B‖₁ ‖v‖₁: an exact pair satisfiesβ A v = α B v, so|β| / |α| = ‖B v‖ / ‖A v‖, and the test readsβfrom the pair's own eigenvector. (schur(A, B)exposesαandβ, but LAPACK's gges orders them differently from the ggev call thateigenmakes, and matching the two would go throughλ, the value that rounding corrupts.) The new test uses the singularQ diag(1, …, 1, 0) Q'over 20 random orthogonalQ, and checks thatgevreturns exactlyn - 1eigenvalues and that they match those of the Schur complement ofQ' J Q; the test fails with the old filter.https://claude.ai/code/session_015sE9Latuiqsp6zSHQ1cshz