Skip to content

exp: Padé denominator via GESVFactorization#240

Draft
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:exp-gesv-denominator
Draft

exp: Padé denominator via GESVFactorization#240
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:exp-gesv-denominator

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Please ignore until reviewed by @ChrisRackauckas. Draft; opened by an agent at Chris's direction.

Switches ExpMethodHigham2005Base's cached Padé denominator solve from LinearSolve's default algorithm to GESVFactorization (SciML/LinearSolve.jl#1074, v4.2.0): one combined gesv! per refactorization, restoring raw-LAPACK parity at small n (−1.8% vs the original gesv! code at n=5, ties within noise at n=10–250; bit-identical accuracy and allocation bytes across all 12 benchmark cells). Also restores the historical SingularException contract — the default algorithm's QR safety-fallback silently resolved singular denominators.

Compat: LinearSolve = "4.2"unmergeable until LinearSolve 4.2.0 tags (#1074). Full EU basictests pass locally against the dev'd branch (22 testsets, 1 pre-existing broken).

🤖 Generated with Claude Code

Benchmarks of the four candidate solve paths on identical per-cell
matrices (n = 5..250, scales 0.3/4.0, best-of-N with preallocated
caches, Julia 1.12, OpenBLAS single-threaded) showed LinearSolve's new
GESVFactorization (v4.2) is the only variant at parity with the raw
LAPACK.gesv! this code historically used in every cell: -1.8% to +2.3%
end-to-end, versus up to +5% for the pinned LUFactorization and up to
+4.5% for the default algorithm choice (whose safety fallback adds an
O(n^2) backup copy per refactorization). GESVFactorization also
reproduces the gesv! results bit-for-bit, keeps the same per-call
allocation bytes, and restores the historical SingularException throw
on a singular denominator (the default algorithm's QR fallback resolved
it silently instead).

Requires LinearSolve 4.2 for GESVFactorization.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants