diff --git a/Project.toml b/Project.toml index 49759be01..5f2847fc7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SymbolicUtils" uuid = "d1185830-fcd6-423d-90d6-eec64667417b" authors = ["Shashi Gowda"] -version = "0.10.2" +version = "0.10.3" [deps] AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" diff --git a/src/types.jl b/src/types.jl index acb6cd5c1..49619c2cc 100644 --- a/src/types.jl +++ b/src/types.jl @@ -602,7 +602,7 @@ function arguments(a::Add) a.sorted_args_cache[] = iszero(a.coeff) ? args : vcat(a.coeff, args) end -Base.isequal(a::Add, b::Add) = isequal(a.coeff, b.coeff) && isequal(a.dict, b.dict) +Base.isequal(a::Add, b::Add) = a.coeff == b.coeff && isequal(a.dict, b.dict) Base.show(io::IO, a::Add) = show_term(io, a) @@ -745,7 +745,7 @@ function arguments(a::Mul) a.sorted_args_cache[] = isone(a.coeff) ? args : vcat(a.coeff, args) end -Base.isequal(a::Mul, b::Mul) = isequal(a.coeff, b.coeff) && isequal(a.dict, b.dict) +Base.isequal(a::Mul, b::Mul) = a.coeff == b.coeff && isequal(a.dict, b.dict) Base.show(io::IO, a::Mul) = show_term(io, a) diff --git a/test/basics.jl b/test/basics.jl index df0c6dc0b..c76c8f6ab 100644 --- a/test/basics.jl +++ b/test/basics.jl @@ -197,3 +197,8 @@ end @test isequal(x^1, x) end end + +@testset "isequal" begin + @syms a b c + @test isequal(a + b, a + b + 0.01 - 0.01) +end