Skip to content

Better support for isapprox #169

Description

@dlfivefifty

There are some issues with isapprox:

julia> x  x
ERROR: StackOverflowError:
Stacktrace:
 [1] isapprox(p1::Variable{…}, p2::Variable{…}; kwargs::@Kwargs{})
   @ MultivariatePolynomials ~/.julia/packages/MultivariatePolynomials/iTfZE/src/operators.jl:54
Some type information was truncated. Use `show(err)` to see complete types.

julia> x  1.0x # This works though...
true

julia> [x x; x x]  [x x; x x]
ERROR: MethodError: no method matching rtoldefault(::Type{Term{…}}, ::Type{Term{…}}, ::Int64)
The function `rtoldefault` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  rtoldefault(::Union{Type{T}, T}, ::Union{Type{S}, S}, ::Real) where {T<:Number, S<:Number}
   @ Base floatfuncs.jl:264
  rtoldefault(::Type{T}) where T<:AbstractFloat
   @ Base floatfuncs.jl:262
  rtoldefault(::Type{<:Real})
   @ Base floatfuncs.jl:263

Stacktrace:
 [1] isapprox(x::Matrix{Variable{…}}, y::Matrix{Variable{…}})
   @ LinearAlgebra ~/Projects/julia-1.11/usr/share/julia/stdlib/v1.11/LinearAlgebra/src/generic.jl:1802
 [2] top-level scope
   @ REPL[37]:1
Some type information was truncated. Use `show(err)` to see complete types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions