JuliaAlgebra / MultivariatePolynomials.jl

Multivariate polynomials interface
https://juliaalgebra.github.io/MultivariatePolynomials.jl/stable/
Other
135 stars 27 forks source link

Cannot compare list of polynomials because of missing `rtoldefault` #289

Open kbarros opened 10 months ago

kbarros commented 10 months ago
using DynamicPolynomials
@polyvar x
a = [2x, x^2]

# Fine to compare individual elements
@assert a[1] ≈ a[1] && a[2] == a[2]

# ERROR: MethodError: no method matching rtoldefault(...) 
a ≈ a
blegat commented 10 months ago

I guess we should add Base.rtoldefault(::AbstractMonomialLike) = MA.Zero() in MultivariatePolynomials