We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0adb690 + 7366407 commit 15d1289Copy full SHA for 15d1289
src/operators.jl
@@ -45,6 +45,7 @@ Base.:-(m::AbstractMonomialLike) = (-1) * m
45
Base.:-(t::AbstractTermLike) = (-coefficient(t)) * monomial(t)
46
Base.:-(p::APL) = polynomial((-).(terms(p)))
47
Base.:+(p::Union{APL, RationalPoly}) = p
48
+Base.:*(p::Union{APL, RationalPoly}) = p
49
50
# Avoid adding a zero constant that might artificially increase the Newton polytope
51
# Need to add polynomial conversion for type stability
test/polynomial.jl
@@ -42,6 +42,8 @@ const MP = MultivariatePolynomials
42
Mod.@polyvar y
43
44
p = 3x^2*y^4 + 2x
+ @test +(p) === p
+ @test *(p) === p
@test terms(p)[end] == 2x
typetests(p)
typetests([p, x + y])
0 commit comments