-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep variables for constant zero Polynomials #81
Conversation
Does this fix #79 as well ? |
No, it doesn't seem to. |
It seems that #79 can be tackled by defining
This uses
but I am not familiar enough with the internals of the package to know whether the fix is any good. |
…verspecialization of last commit - that broke tests too
src/mult.jl
Outdated
@@ -60,7 +73,7 @@ end | |||
function _term_poly_mult(t::Term{C, S}, p::Polynomial{C, T}, op::Function) where {C, S, T} | |||
U = MA.promote_operation(op, S, T) | |||
if iszero(t) | |||
zero(Polynomial{C, U}) | |||
zero( Polynomial{C,U} ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove spaces before and after parenthesis to stay consistent with the rest of the code base
Thanks, looking good, could you add some tests ? |
added tests from issue descriptions
file `mult.jl`, function `_multconstant_to!`
I have composed some basic tests from the issue descriptions. The nightly built still fails, but this seems to a separate problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks a lot! Could your remove the Draft mode of the PR so that I can merge ?
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 (see
operators.jl
in MultivariatePolynomials).