Ilya Zakharevich on Mon, 15 Jul 2002 09:00:32 -0400 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: polcoeff() mystery |
On Sun, Jul 14, 2002 at 05:37:54PM +0200, Karim BELABAS wrote: > > 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. Do you mean here the support for base arithmetic, or higher-level stuff? If former, it is not out-of-hand to fix... > > > 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. This confuses me again, when I felt almost unconfused... Consider: ? aaa=x^2 + y*x + z; ? aaa %2 = x^2 + y*x + z ? \x [&=004854c4] POL(lg=5,CLONE):15000005 (+,varn=0,lgef=5):40000005 004854d8 004854fc 00485520 coef of degree 0 = [&=004854d8] POL(lg=4):14000004 (+,varn=3,lgef=4):40030004 004854e8 004854f0 coef of degree 0 = [&=004854e8] INT(lg=2):02000002 (0,lgef=2):00000002 coef of degree 1 = [&=004854f0] INT(lg=3):02000003 (+,lgef=3):40000003 00000001 coef of degree 1 = [&=004854fc] POL(lg=4):14000004 (+,varn=2,lgef=4):40020004 0048550c 00485514 coef of degree 0 = [&=0048550c] INT(lg=2):02000002 (0,lgef=2):00000002 coef of degree 1 = [&=00485514] INT(lg=3):02000003 (+,lgef=3):40000003 00000001 coef of degree 2 = [&=00485520] INT(lg=3):02000003 (+,lgef=3):40000003 00000001 If every polynomial is filled, then aaa contains a filled poly, then coefficient of degree 2 of aaa must be a polynomial in y - no matter whether the simplifications are enabled or not. Right? If \x outputs 'foo^0 as 'foo^0 not 1, then we would see "coef of degree 2" not as an INT. Right? Ilya