exp: Padé denominator solve via LinearSolve default algorithm (alias_A)#240
Conversation
965b52b to
49782ca
Compare
|
LinearSolve 4.3.0 (with |
Route ExpMethodHigham2005Base's Padé denominator solve (V - U) X = (V + U) through a cached LinearSolve workspace using the *default* algorithm choice with alias_A/alias_b, replacing the raw LAPACK.gesv! calls. The default size-selects the fastest available LU — notably RecursiveFactorization when loaded (the common case in SciML/exponential- integrator stacks), whose solve is ~2-2.7x faster than LAPACK LU at small/medium n. alias_A lets it refactorize in place (no O(n^2) copy); per-call allocation stays small and O(1)-ish. On a singular denominator the solve returns a Failure retcode, which this code turns back into the SingularException exp! has always thrown. An earlier revision pinned GESVFactorization for raw-gesv! parity; with alias_A the default is allocation-competitive and faster (RFLU), needs no 4.3-only feature, and auto-benefits from future LinearSolve improvements, so it wins here. Requires LinearSolve 4.1 (alias_A in-place refactorization). Verified vs Base.exp to ~2e-15; exp-methods 40/40 and Phi 284/284 on LinearSolve 4.1. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYp371jx6LurezUDhKcYRh
49782ca to
c133716
Compare
|
Switched from With
Singular-denominator behavior is unchanged: the solve returns a Verified against registered LinearSolve 4.1.0: |
Switches
ExpMethodHigham2005Base's cached Padé denominator solve from LinearSolve's default algorithm toGESVFactorization(SciML/LinearSolve.jl#1078, v4.3.0): one combinedgesv!per refactorization, restoring raw-LAPACK parity at small n (−1.8% vs the originalgesv!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 historicalSingularExceptioncontract — the default algorithm's QR safety-fallback silently resolved singular denominators.Compat:
LinearSolve = "4.2"— unmergeable until LinearSolve 4.3.0 tags (#1078). Full EU basictests pass locally against the dev'd branch (22 testsets, 1 pre-existing broken).🤖 Generated with Claude Code