manpagez: man pages & more
info ginac
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.7.1 Testing whether an expression is a polynomial

Testing whether an expression is a polynomial in one or more variables can be done with the method

 
bool ex::is_polynomial(const ex & vars) const;

In the case of more than one variable, the variables are given as a list.

 
(x*y*sin(y)).is_polynomial(x)         // Returns true.
(x*y*sin(y)).is_polynomial(lst(x,y))  // Returns false.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.