Karim Belabas on Mon, 27 Oct 2014 11:45:16 +0100


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

Re: A Strange problem


* Karim Belabas [2014-10-27 11:08]:
> * Allan MacLeod [2014-10-27 10:57]:
>> I used  isqsquare(polynomial,&root)
>> 
>> At the start of the program, everything worked fine and the roots,
>> when found, were rational.
>> 
>> At a certain point, however, the roots changed to having real
>> coefficients which completely screwed the code.
[...]
> 
> Indeed, I can reproduce the problem:
> 
> (11:05) gp > issquare((x+1/2)^2,&n); n
> %1 = 1.0000000000000000000*x + 0.5000000000000000000
> 
> The current (faulty) code works as you expected iff the constant coefficient
> is an integer.
> 
> I'll fix the problem shortly. In the meantime, a simple workaround is to kill
> the content first.

The problem is now fixed in the 'master' branch (commit 42065385).

Cheers,

    K.B.
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux         Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux1.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux1.fr/  [PARI/GP]
`