skyon0522-ai opened a new pull request, #332:
URL: https://github.com/apache/commons-math/pull/332

   The finite 2-by-2 matrix in 
[MATH-1424](https://issues.apache.org/jira/browse/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 +/- i` block beside `1e13`, 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:
   
   - The original EigenDecomposition test class reports 30 tests, 0 
failures/errors and 2 existing skips.
   - The fixed EigenDecomposition/Schur/Hessenberg classes report 50 tests, 0 
failures/errors and 2 existing skips.
   - Root `clean verify` with command-local `JAVA_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.testVeryLargeAllocation` with 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to