Dear all, we just tried to use the functions gcd() and lcm() and we found something strange.
gcd(2*x+1, x+1/2); 1 gcd(2*x+1, 4*x+2); 1+2*x
The documentation (section 5.5.5 of GiNaC 1.0.10) says that gcd() accepts two expressions, without specifying their type. In the last sentence, it talks about polynomials, again, without specifying whether they are integer polynomials or they are allowed to have rational coefficients. Since we need the functions gcd() and lcm() very often, we would like to know as precisely as possible what is the intended behaviour. Thank you very much Alessandro Zaccagnini and Tatiana Zolo
Hi! On Mon, Sep 16, 2002 at 03:38:46PM +0200, Alessandro Zaccagnini wrote:
In the last sentence, it talks about polynomials, again, without specifying whether they are integer polynomials or they are allowed to have rational coefficients.
Only polynomials with integer coefficients are allowed for gcd() and lcm(). Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
participants (2)
-
Alessandro Zaccagnini
-
Christian Bauer