While verifying #531, three pre-existing edge-case failures in QuadraticSpline construction were confirmed on current master (they reproduce identically on the unmodified base, so they are independent of that PR):
-
n = 2 throws BoundsError. QuadraticSpline(u, t) with two points fails in quadratic_spline_parameters' midpoint basis evaluation (src/parameter_caches.jl → _spline_coefficients_body! writes N[0]). The knot/system construction itself handles n = 2 fine; it is the parameter midpoint evaluation that under-indexes.
QuadraticSpline([1.0, 2.0], [0.0, 1.0]) # BoundsError
-
Rational knots with t[1] == 0 throw DivideError. src/interpolation_utils.jl computes the coefficient eltype as dtype_sc = typeof(t[1] / t[1]), which evaluates 0//0 for Rational. A fix is typeof(one(eltype(t)) / one(eltype(t))).
QuadraticSpline([1//1, 2//1, 3//1], [0//1, 1//1, 2//1]) # DivideError
-
Duplicate knots throw SingularException. Both interior duplicates (t = [0, 1, 1, 2, 3]) and boundary duplicates (t[2] == t[1]) produce a singular tridiagonal collocation system. If duplicates are intentionally unsupported, an informative ArgumentError at construction would beat the raw SingularException from the linear solve.
All three were verified by running on a clean checkout of the merge-base (bf7c4edd) — error type and stacktrace location identical to the PR branch.
🤖 Generated with Claude Code
While verifying #531, three pre-existing edge-case failures in
QuadraticSplineconstruction were confirmed on currentmaster(they reproduce identically on the unmodified base, so they are independent of that PR):n = 2throwsBoundsError.QuadraticSpline(u, t)with two points fails inquadratic_spline_parameters' midpoint basis evaluation (src/parameter_caches.jl→_spline_coefficients_body!writesN[0]). The knot/system construction itself handles n = 2 fine; it is the parameter midpoint evaluation that under-indexes.Rationalknots witht[1] == 0throwDivideError.src/interpolation_utils.jlcomputes the coefficient eltype asdtype_sc = typeof(t[1] / t[1]), which evaluates0//0for Rational. A fix istypeof(one(eltype(t)) / one(eltype(t))).Duplicate knots throw
SingularException. Both interior duplicates (t = [0, 1, 1, 2, 3]) and boundary duplicates (t[2] == t[1]) produce a singular tridiagonal collocation system. If duplicates are intentionally unsupported, an informativeArgumentErrorat construction would beat the rawSingularExceptionfrom the linear solve.All three were verified by running on a clean checkout of the merge-base (
bf7c4edd) — error type and stacktrace location identical to the PR branch.🤖 Generated with Claude Code