Karim Belabas on Sun, 16 Jan 2005 19:56:16 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Gaussian Integer factorisation at right angles


* Bill Allombert [2005-01-10 14:05]:
> On Sun, Jan 09, 2005 at 02:13:10PM +0100, Karim Belabas wrote:
>> * Phil Carmody [2005-01-06 17:31]:
>>> Is there any reason why things should get rotated by 90 degrees?
>>> 
>>> (18:16) gp > factorback(factor(17+0*I))
>> 
>> The same one as for
>> 
>> (14:16) gp > factorback(factor(-x))
>> %1 = x
>> 
>> (or worse, factor(x*y) ... ).
>> 
>> factor() is a little inconsistent in that it factors up to units in the
>> chosen UFD, _except_ if the latter hapens to be Z, in which case
>> annoying factors (-1)^1 crop up.
> 
> That is not entirely true:
> ? factor(17+0*I)
> %1 =
> [-I 1]
> 
> [4 - I 1]
> 
> [4 + I 1]
> 
> factoring Gaussian integers report a unit. 
> 
> In this case, the unit is wrong.

OK, so I was completely off the mark. (Had completely forgotten about how I
implemented this function in the end. Turns out I implemented the
behaviour I don't like about Z for Z[i]...).

Anyway, I have found the problem. For some reason, my implementation
expected qfbsolve to always return a normalized solution (in north-east
quadrant).

It's fixed in CVS.

Thanks!

    Karim.
-- 
Karim Belabas                     Tel: (+33) (0)1 69 15 57 48
Dep. de Mathematiques, Bat. 425   Fax: (+33) (0)1 69 15 60 19
Universite Paris-Sud              http://www.math.u-psud.fr/~belabas/
F-91405 Orsay (France)            http://pari.math.u-bordeaux.fr/  [PARI/GP]