Symbolics.jl icon indicating copy to clipboard operation
Symbolics.jl copied to clipboard

`symbolic_linear_solve` returns Inf if var is missing

Open baggepinnen opened this issue 6 months ago • 2 comments

solving for a variable that does not appear in the equation gives a nonsensical result

julia> @variables a b
2-element Vector{Num}:
 a
 b

julia> symbolic_linear_solve(0 ~ a, b)
(-1//0)*a

baggepinnen avatar May 14 '25 07:05 baggepinnen

0 ~ a + 0b -0b ~ 1*a b ~ -1/0 * a

ChrisRackauckas avatar May 22 '25 15:05 ChrisRackauckas

We can make this return NaN

ChrisRackauckas avatar May 22 '25 15:05 ChrisRackauckas