JuliaSymbolics / SymbolicUtils.jl

Symbolic expressions, rewriting and simplification
https://docs.sciml.ai/SymbolicUtils/stable/
Other
524 stars 99 forks source link

Check if Sym-type is zero: Define iszero #497

Open davidschlegel opened 1 year ago

davidschlegel commented 1 year ago

Currently, iszero(x) of a SymbolicUtils.Sym x is equal to x==0. This however does not give a boolean, but rather defines an equation. For this type, would it be more adequate to define Base.iszero(x::SymbolicUtils.Sym) = x===0 ? This would also fix #6 so that symbolic numbers work with SparseArrayKit.jl.