Karim BELABAS on Tue, 7 Jan 2003 21:17:58 +0100 (MET) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: gp: gcd(0) error message unhelpful |
On Tue, 7 Jan 2003, Michael Somos wrote: > I suppose I could just use "gdb" and get a backtrace that way if all else > fails. Btw, you can use break loops for this purpose: (21:14) gp > i = 0; 1/i; i^2 *** division by zero in gdiv, gdivgs or ginv *** Break loop (type 'break' or Control-d to go back to GP): i=0;1/i;i^2 ^---- The default error message is distinctly unhelpful, but the break loop tells me where where the problem occured [ and I can also inspect the local variables at this point ] At the end of my initialization file, I set the default trap handler to enable this behaviour [ 'trap()'; I agree the interface is not nice, but at least it is documented ] Cheers, 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/