You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Changed
Breaking:golub_welsch() now returns Result, propagating QL non-convergence as QuadratureError::InvalidInput instead of silently returning inaccurate nodes/weights. All internal compute_* functions in gauss_jacobi, gauss_laguerre, gauss_hermite, and gauss_radau propagate accordingly. Public constructors already returned Result, so most callers are unaffected.
Breaking:GaussLobatto::new(0) now returns QuadratureError::ZeroOrder (previously InvalidInput). GaussLobatto::new(1) still returns InvalidInput.
Input validation for tanh_sinh, oscillatory, cauchy_pv, and cubature::adaptive now rejects ±Inf bounds (not just NaN). Error variant is unchanged (DegenerateInterval).
CubatureRule::new assertion promoted from debug_assert_eq! to assert_eq!.
Tanh-sinh non-convergence error estimate now uses the difference between the last two level estimates instead of a fabricated tol * 10 value.
QUADPACK error estimation heuristic in gauss_kronrod documented as an intentional simplification of the full formula.
Fixed
ln_gamma reflection formula: .sin().ln() → .sin().abs().ln() prevents NaN for negative arguments where sin(π·x) is negative (affects Gauss-Jacobi with certain α, β near negative integers).
Newton iteration in Gauss-Lobatto interior node computation now clamps iterates to (-1+ε, 1-ε), preventing division by zero in the P'' formula when an iterate lands on ±1.
partial_cmp().unwrap() in golub_welsch and gauss_lobatto sort replaced with .unwrap_or(Ordering::Equal) to avoid panics on NaN nodes.
Adaptive cubature global_error subtraction clamped to max(0.0) to prevent negative error estimates from floating-point cancellation.
Added
Dimension cap (d ≤ 30) for adaptive cubature — returns InvalidInput for higher dimensions where Genz-Malik's 2^d vertex evaluations would be impractical.