Karim Belabas on Mon, 10 Apr 2006 10:18:19 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Pol problem (bug?)


* Joerg Arndt [2006-04-09 11:27]:
> I do not see a system here:
> 
> ? Pol([a,b,c])
> a*x^2 + b*x + c
> ? Pol([a,b,c],d)
> a*d^2 + b*d + c
> ? Pol([a,b,c],x)
> a*x^2 + b*x + c
> ? Pol([a,x,c])
> a*x^2 + x*x + c
> ? Pol([a,x,c],'x)
> a*x^2 + x*x + c
> 
> ? Pol([a,x,c],'x_)
>   *** Pol: main variable has highest priority in gtopoly.
> ? Pol([a,x,c],'a_)
>   *** Pol: main variable has highest priority in gtopoly.
> ? Pol([a,x,c],'z_)
>   *** Pol: main variable has highest priority in gtopoly.

I have reworded the error message and fixed an off-by-1 problem. The
correct behaviour (current CVS, clean session) is

? Pol([a,b,c])
%1 = a*x^2 + b*x + c
? Pol([a,b,c],d)
  *** Pol: variable must have higher priority in gtopoly.
? Pol([a,b,c],x)
%2 = a*x^2 + b*x + c
?  Pol([a,x,c])
  *** Pol: variable must have higher priority in gtopoly.
? Pol([a,x,c],'x)
  *** Pol: variable must have higher priority in gtopoly.
? Pol([a,x,c],'x_)
  *** Pol: variable must have higher priority in gtopoly.
? Pol([a,x,c],'a_)
  *** Pol: variable must have higher priority in gtopoly.
? Pol([a,x,c],'z_)
  *** Pol: variable must have higher priority in gtopoly.

> what is a "main variable"?

(09:38) gp > ??Pol
Pol(x,{v = x}):

   transforms the object x into a polynomial with main variable v. [...]
   Warning: this is not a substitution function.   It will not transform an
object containing variables of higher priority than v.

   ? Pol(x + y, y)
     *** Pol: variable must have higher priority in gtopoly.

See also Section 2.5.4 (p. 39, current CVS) of the User's manual, on
"Variable priorities, multivariate objects"

> There does not seem to be a workaround.

There might be. What are you trying to achieve ?

Cheers,

    K.B.
-- 
Karim Belabas                  Tel: (+33) (0)5 40 00 26 17
Universite Bordeaux 1          Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux.fr/~belabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]