MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: PolynomialGCD

  • To: mathgroup at
  • Subject: [mg60291] Re: [mg60276] PolynomialGCD
  • From: Andrzej Kozlowski <akoz at>
  • Date: Sat, 10 Sep 2005 06:46:40 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

On 9 Sep 2005, at 17:07, jonspalmer at wrote:

> Is there anyway to get PolynomialGCD to work with Complex numbers? For
> example get:
> PolynomialGCD[(x+y) I, (x+y) 2 I]
> to return:
> (x+y) I
> ?
> Many thanks
> Jon Palmer

It looks to me you have found prehistoric bug. But first let me point  
out that in general PolynomialGCD cannot be expected to work over  
real or complex numbers. PolynomialGCD is mathematically defined but  
it does not make sense to try to compute it by means of the Euclidean  
algorithm because a crucial step in the algorithms demands  
determining if a real or complex expression is 0 and this cannot be  
done exactly. On the other hand there is no problem with using the  
Euclidean algorithm over any algebraic extension of the rationals,  
and you can do it with PolynomialGCD by means of the option Extension- 
 >{a sequence of algebraic numbers}.
  However, this has nothing to do with the problem here. In fact just  
replace I by 1+I and everything works fine:

PolynomialGCD[(x + 1)*(I + 1), (x + 1)*2*(I + 1)]

(1 + I)*x + (1 + I)

here PolynomialGCD simply treats I as a variable, which is exactly  
what the documentation tells you it will do:

PolynomialGCD[poly1, poly2, ? ] will by default treat algebraic  
numbers that appear in the polyi as independent variables.

So we have to conclude that

PolynomialGCD[(x+y) I, (x+y) 2 I]


is a bug and one that must have been with us since time immemorial.  
In the immortal words of a former contributor this list it is a "bug  
the long liver" ;-)


  • Prev by Date: Re: Precedence
  • Next by Date: Re: A very EZ Question! Make a Graph!
  • Previous by thread: PolynomialGCD
  • Next by thread: Re: PolynomialGCD