Karim Belabas on Sun, 06 Mar 2005 13:58:00 +0100


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

Re: Math::Pari: error in rnfinit()


* Ilya Zakharevich [2004-12-16 10:13]:
> I got a report of exactly one test failing in Math::Pari test suite:
> test 21 of nfields.  Here it is:
> 
>      not ok 21 # in='rnfinit($nf2,$x**5-$x-2)'
>  out=[	x^5 - x - 2,
> 	[[1, 2], [0, 5]],
> 	[[49744, 0, 0; 0, 49744, 0; 0, 0, 49744], [3109, 0, 0]~],
> 	[1, 0, 0; 0, 1, 0; 0, 0, 1],
> 	[[[1,
> 	   1.2671683045421243172528914279776896412,
> 	   1.6057155120361619195949075151301679393,
> 	   2.0347118029638523119874445717108994866,
> 	   2.5783223055935536544757871909285592749;
> 	   1,
> 	   -0.89454803265751744362901306471557966872
> 		+ 0.53414854617473272670874609150394379949*I,
> 		...
> pari=[  x^5 - x - 2,
>         [[1, 2], [0, 5]],
>         [[49744, 0, 0; 0, 49744, 0; 0, 0, 49744], [3109, 0, 0]~],
>         [1, 0, 0; 0, 1, 0; 0, 0, 1],
>         [[[1,
>            1.2671683045421243172528914279776896412,
>            1.6057155120361619195949075151301679393,
>            2.0347118029638523119874445717108994866,
>            2.5783223055935536544757871909285592749;
>            1,
>            0.26096388038645528500256735072673484811
>                 + 1.1772261533941944394700286585617926513*I,
>                 ...
> 
> The upper value is what Math::Pari returns, the lower one is what
> GP/PARI is expected to return (up to the first different value).
> Since I do not know what is the meaning of this, I have no idea how to
> fix it...

This is obsolete data in the rnf structure (pari-2.1.* stable series only)
which was never used anywhere. It's computed by evaluating polynomials
representing the integer basis at the complex roots of other polynomials.

I have no idea what could cause it to deviate from the precomputed one,
but the answer is far from canonical. Possibly some floating point
computation (done using FPU, not pari t_REALs) in polroots() which upsets
slightly one root, causing other data to change... [ There's something like
this in the 'elliptic' bench in the stable series also. ]

I'd ignore this problem.

Cheers,

    Karim.

P.S: All this has been ironed out and completely rewritten in pari-2-2.*.
-- 
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]