Karim Belabas on Fri, 11 Feb 2022 20:36:58 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: use of prodeulerrat in a script |
Dear Alessandro, * Alessandro Languasco [2022-02-11 17:17]: > I am experimenting with prodeulerrat and I am trying to generate > (randomly ) a rational function g(x)= a(x)/b(x) and then compute > > prodeulerrat(g(1/p)) > > g is such that deg(b)>deg(a)+2, so the product converges. > > Now, I’d like to do that in a script; so > > - in input I have a parameter y (an integer), > - I generate first g(x,y) as a polynomial in x > - then I would like to compute prodeulerrat(g(1/p,y)) > > If I do so in the shell, it works nicely. > But I would like to write a script that do so and I am stuck on this > because I do not know how to “pass” the information about > perform the infinite product on p. > > What am I missing here ? > Do you have any suggestion ? Can you give a concrete minimal example ? What's wrong with, e.g., g = 1 - y * x^2 prodeulerrat(substvec(g, [x,y], [1/x, 2])) Or directly (if g is indeed a polynomial in x and y is no longer there) g = 1 - x^2 prodeulerrat(subst(g, x, 1/x)) ? 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 21 23 351, cours de la Liberation http://www.math.u-bordeaux.fr/~kbelabas/ F-33405 Talence (France) http://pari.math.u-bordeaux.fr/ [PARI/GP] `