Closed manuelbb-upb closed 3 years ago
Does this fix https://github.com/JuliaAlgebra/DynamicPolynomials.jl/issues/79 as well ?
Does this fix #79 as well ?
No, it doesn't seem to. But I can have a look into it in the near future.
It seems that #79 can be tackled by defining
function MA.mutable_operate_to!(p::Polynomial{true, T}, ::typeof(*), q1::Number, q2::MP.AbstractPolynomialLike) where T
q1 * q2
end
This uses
function Base.:(*)(p::Polynomial, α)
MP.multconstant(α,p);
end
Base.:(*)(α, p::Polynomial) = p * α;
but I am not familiar enough with the internals of the package to know whether the fix is any good.
Thanks, looking good, could you add some tests ?
I have composed some basic tests from the issue descriptions. The nightly built still fails, but this seems to a separate problem.
Did so :) Thanks also for reviewing. This was the first time for me to actually try to contribute to another project and a great learning experience.
Fix of issue #80
Overwrite
multconstant
of MultivariatePolynomials so that in case ofα==0
the variables ofp
are kept. Else do the same as before (seeoperators.jl
in MultivariatePolynomials).