Releases: Entrolution/bilby
Releases · Entrolution/bilby
v0.2.0
Changed
- Breaking:
golub_welsch()now returnsResult, propagating QL non-convergence asQuadratureError::InvalidInputinstead of silently returning inaccurate nodes/weights. All internalcompute_*functions ingauss_jacobi,gauss_laguerre,gauss_hermite, andgauss_radaupropagate accordingly. Public constructors already returnedResult, so most callers are unaffected. - Breaking:
GaussLobatto::new(0)now returnsQuadratureError::ZeroOrder(previouslyInvalidInput).GaussLobatto::new(1)still returnsInvalidInput. - Input validation for
tanh_sinh,oscillatory,cauchy_pv, andcubature::adaptivenow rejects±Infbounds (not justNaN). Error variant is unchanged (DegenerateInterval). CubatureRule::newassertion promoted fromdebug_assert_eq!toassert_eq!.- Tanh-sinh non-convergence error estimate now uses the difference between the last two level estimates instead of a fabricated
tol * 10value. - QUADPACK error estimation heuristic in
gauss_kronroddocumented as an intentional simplification of the full formula.
Fixed
ln_gammareflection formula:.sin().ln()→.sin().abs().ln()preventsNaNfor negative arguments wheresin(π·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 theP''formula when an iterate lands on ±1. partial_cmp().unwrap()ingolub_welschandgauss_lobattosort replaced with.unwrap_or(Ordering::Equal)to avoid panics on NaN nodes.- Adaptive cubature
global_errorsubtraction clamped tomax(0.0)to prevent negative error estimates from floating-point cancellation.
Added
- Dimension cap (d ≤ 30) for adaptive cubature — returns
InvalidInputfor higher dimensions where Genz-Malik's2^dvertex evaluations would be impractical. - New tests: infinity rejection (tanh-sinh, oscillatory, Cauchy PV, cubature), dimension cap, Lobatto error variant splitting, tanh-sinh non-fabricated error, Jacobi negative α/β exercising the reflection path.