| Karim Belabas on Wed, 26 Nov 2014 23:50:14 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: new GP functions varhigher / varlower |
* Karim Belabas [2014-11-26 19:11]:
> I spent some time with Bill to allow variables of arbitrary priorities
> in libpari, then GP. There were discussions on pari-dev, originating e.g. in
[...]
> 6) [TODO] We need a variables(T) function that returns the list of
> variables used in T: with variable(T) we can get the variable of highest
> priority occuring in T, but it's very hard to get the variable of lowest
> priority. It's useful to obtain e.g. a variable of lower priority than
> all variables occuring in T without using up a variable number to create
> a *new* variables with guaranteed lowest priority.
That one is now committed in master:
? v=x*y+O(x)+Mod(y*a*z,y^2+1)*t/(y+t);
? variables(v)
%2 = [x, y, z, t, a]
? tt=varlower("y",x);
? zz=varhigher("y",x);
? variables([v,tt,zz])
%5 = [y, x, y, z, t, a]
It's unfortunate to have two functions named variable() [ the historical one ]
and variables() [ the new one ], but I couldn't come up with a better name
in the PARI style, i.e. VariablesInObject is not an option :-).
Suggestions ?
Cheers,
K.B.
--
Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation http://www.math.u-bordeaux1.fr/~kbelabas/
F-33405 Talence (France) http://pari.math.u-bordeaux1.fr/ [PARI/GP]
`