Repository navigation
MATH-1424: Preserve converged real Schur boundaries - #332
asf-gitbox-commits merged 1 commit into
Conversation
Clear subdiagonals after accepted relative splits and real-pair rotations. Keep the existing convergence decisions and genuine complex blocks, with analytic, scaled and reconstruction regressions. Generated-by: OpenAI Codex
|
Using Temurin 17.0.20.1+1 and a direct JUnit4 The test calls |
The finite 2-by-2 matrix in MATH-1424 has two real eigenvalues, approximately 9,900,980.4766 and 20,099,019.5234. On current master, the unscaled input instead returns a complex pair with real parts 15,000,000 and imaginary parts approximately +/-5,099,019.5234; scaling the same input by 2^-20 works.
Schur convergence already identifies real pairs and negligible split boundaries, but their subdiagonal entries can retain rounding residuals. Eigenvalue extraction then interprets a residual above its absolute threshold as a complex block. Make those existing convergence decisions explicit by clearing accepted splits and the subdiagonal after a real-pair rotation. No convergence threshold, public API or dependency changes.
The regressions cover the analytic two-root result at both scales, a genuine
2 +/- iblock beside1e13, accepted split and one-root boundaries, and normalized Schur reconstruction and orthogonality residuals. All three new methods fail against the original Schur implementation; the mixed-scale complex control runs before the split assertion fails.Validation on Linux, Temurin JDK 17.0.20.1+1 and Maven 3.9.11:
clean verifywith command-localJAVA_TOOL_OPTIONS=-Xmx6g: all 14 modules succeeded, exit 0. Retained reports contain 3,787 tests, 33 skips and zero final failures/errors. The existing retry policy recovered 41 cases after 79 failed attempts; this was not a first-pass-clean run.The default-heap root run stopped at the existing
FP64FieldDenseMatrixTest.testVeryLargeAllocationwith heap exhaustion. The same allocation test also failed on pristine master at the default heap, then passed with the command-local 6 GiB setting before the fixed root run. Product code, POMs, JaCoCo and native retry settings were unchanged. I have not isolated the causes of the recovered flaky cases. The original-master comparison covered that allocation test, not a complete root build.An isolated probe also reproduces the reported input failure in unmodified Commons Math 3.6.1. This patch and its regression tests target Math 4 master; it is not a tested Math 3 backport. Windows, macOS and new upstream GitHub CI have not been run for this patch.
AI assistance: OpenAI Codex assisted with source analysis, the implementation, regression tests and drafting.