Karim BELABAS on Wed, 18 Sep 2002 13:01:46 +0200 (MEST)

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

Re: nfinit(,2) on alpha is broken.

On Tue, 17 Sep 2002, Bill Allombert wrote:
> On alpha, GP fails to pass the bench:
> ? nfinit(x^5-5*x^3+5*x+25,2)
>   ***   precision too low in mptrunc (precision loss in truncation).

My mistake. In my first patches after 2.2.4, I cleaned up some wrong precision
estimates in rootpol.c [ confusions between bit precision, number of digits
in base 10 as needed by gprec, number of words as needed by gprec_w. Some
objects were computed to a much higher precision than intended (or than was
necessary). ]

Unfortunately this had the side effect of protecting the code from an
incorrect use of the gfloor() function [ we want to take the leading bits of
an object, not caring at all about "precision loss in truncation"; gcvtoi()
should have been used, not gfloor() ].

There's a comment in there stating that "ground has a bug, hence we
use our own mygfloor() function", dating from the original implantation,
around 1995. [ of course, the bug in ground has long been corrected, and
mygfloor now introduces the above bug, and is quite useless besides that. ]

I'm cleaning up this mess.

Karim Belabas                    Tel: (+33) (0)1 69 15 57 48
Dép. de Mathematiques, Bat. 425  Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud             Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France)           http://www.math.u-psud.fr/~belabas/
PARI/GP Home Page: http://www.parigp-home.de/