Karim BELABAS on Sun, 14 Jul 2002 17:37:54 +0200 (MEST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: polcoeff() mystery |
On Thu, 4 Jul 2002, Ilya Zakharevich wrote: > On Thu, Jul 04, 2002 at 02:23:08PM +0200, Bill Allombert wrote: > > There are three things to keep in mind: > > 1) GP know only about univariate polynomials over a field. > > "Currently". Given Groebner bases, this should be easy to fix. > > > 2) 'foo^0 is printed as 1 for every foo., but is internally still 'foo^0 > > 3) The same happen for zero complex, quadratic and algebraic numbers. > > > > There is no such thing as x^2+y*x+z. > > Why? *This* is what was confusing me so much when "inefficient" > internal representation was mentioned. I was doing \x, and saw > something very efficient. > > Which algorithsms assume that a poly is "filled"? Nearly everything operates on "filled" single variable polynomials. Once the higher level wrappers have done their stuff [ checking types, degrees, variable priorities, etc ], lower level routines assume everything is compatible (all args in sight are t_POL in the same variable) and operate on vectors of coefficients. If one of them were to return a scalar instead, the next one would immediately raise a SEGV. > > Maybe a print function that output 'foo^0 as 'foo^0 not 1 could be useful. > > \x *must*. \x *does*. Disable automatic simplification (\y) if you want \x to operate in the way you expect. Karim. -- 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/