[bugfix] ex::is_polynomial(x): fix miscomputations
authorRichard Kreckel <kreckel@ginac.de>
Fri, 25 Jul 2014 23:11:11 +0000 (23:11 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Fri, 25 Jul 2014 23:11:11 +0000 (23:11 +0000)
commit92da4c16f5d6edf276be011a08ce04b352945a83
tree38f7c0fb4c01a2261d5c42ebf5646081c7059652
parent4e53a7554e39c687b6cf467af3c967760ce3a521
[bugfix] ex::is_polynomial(x): fix miscomputations

The function power::is_polynomial(x) sometimes returned false,
even if x did not occur in the power object.

Thanks to Rubel Zilibowitz for reporting this bug.

Similarly, mul::is_polynomial(x) sometimes returned true, even
if x occurred only in the denominator of a rational function.

The function mul::is_polynomial(x) does a simpler version of
power::is_polynomial(x) on its factors. (It's simpler because the
exponents cannot be functions of x.)
check/exam_paranoia.cpp
ginac/mul.cpp
ginac/power.cpp