8 Mar
2002
8 Mar
'02
2:40 p.m.
On Thu, 7 Mar 2002, Christian Bauer wrote:
On Thu, Mar 07, 2002 at 12:58:59PM +0100, Roberto Bagnara wrote:
if (is_a_polynomial(e, x)) {
if (e.info(info_flags::polynomial)) {
(there's also info_flags::integer_polynomial and a couple of others; the complete list is in the GiNaC tutorial) [...]
Just one point: The precondition (e.info(info_flags::polynomial)==true) does not make it safe to call .degree(x) in the sense that the result is precise -- it might still be an upper limit. The reason is the same as always considering that even an unexpanded polynomial is a polynomial. Regards -richy. -- Richard B. Kreckel <Richard.Kreckel@Uni-Mainz.DE> <http://wwwthep.physik.uni-mainz.de/~kreckel/>