I've got multivariate polynomials with numerical coefficients, like e. g.
p - s - p q^2 s^2 + 3 r s^2 + 3 r^2 s^2 - p r^2 s^2 - 2 q r^2 s^2 - 2 r^3 s^2 + s^3
and I would like to take the sum of those monomials with positive coefficients only.
Although for my purposes
seems to be quick enough, it involves translating to another form and back, so I feel there must be a more optimal way to do it, probably using some tricks with the internal representation of polynomials.