Karim BELABAS on Fri, 21 Feb 2003 20:22:34 +0100 (MET) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: algdep() regression |
On Tue, 18 Feb 2003, Igor Schein wrote: > \\ pari-2.2.4: > > ? algdep(2^46,1) > x - 70368744177664 > > \\ pari-2.2.5 > > ? algdep(2^46,1) > 1 > > Manual does warn about a possibility of an infinite loop, but not a > completely bogus result. It's not completely bogus: it tells you there does not exist a linear combination of height less than 1 [trivial but true...]. > I can still trick it into giving a correct answer by doing > > algdep(precision(2^46.,29),1) > > but that shouldn't be necessary (I think?). No it shouldn't. It was a typo in fact: I had changed the routine to depend on the accuracy of the inputs. But if the input was exact, the computation was done at precision -1 ... [ later on fixed to DEFAULTPREC, but that was clearly not enough for large inputs ]. If infinite accuracy is detected, I now launch extendedgcd() instead to find a small linear combination [ based on Havas/Majewski/Matthews's HNFLLL ideas, about twice faster than kerint / integral LLL. Wrote it 5 years ago, had never found a use for it before :-) ]. Karim. -- Karim Belabas Tel: (+33) (0)1 69 15 57 48 Dép. de Mathématiques, Bât. 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/