Karim BELABAS on Sun, 18 May 2003 18:44:21 +0200 (MEST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: charpoly using too much stack space ! |
On Sun, 18 May 2003, Bill Allombert wrote: > On Sat, May 17, 2003 at 01:21:53PM -0500, Gonzalo Tornaria wrote: > > When computing the characteristic polynomial of big matrices (not so > > much, in the example 50x50), PARI uses A LOT of stack space, which I > > believe is not really necesary. I've written a gp function for > > computing the characteristic polynomial (matrix_charpoly), using what > > I believe is the same algorithm of charpoly (computing traces, etc.) [...] > This also hold for libpari but here there is something wrong. > > Here a patch that should fix the problem This patch is quite correct. I have committed to CVS a different one, which fixed a number of minor annoyances [ stack leaks ], and handles stack usage in a less hackish way than previously. I have not noticed any efficiency loss. 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 http://www.math.u-psud.fr/~belabas/ F-91405 Orsay (France) http://www.parigp-home.de/ [PARI/GP]