Karim Belabas on Mon, 28 Jun 2010 12:14:52 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Precision of power series |
* Xavier Roblot [2010-06-28 09:53]: > Dear PARI users, > > Does anybody know how to get in GP the precision of a power series? > That is, if the power series is X+O(X^20) say, I am looking for a > function that would return 20. Actually, I'd rather return 19 since your series has valuation 1 and only 19 significant terms are known. That you can get with s = X + O(X^20); length(s) or simply #s If you really want the 20 above, then use (#s + valuation(s, 'X)). Both also work for trivial power series O(X^n), with 0 sigificant terms. Cheers, K.B. -- Karim Belabas, IMB (UMR 5251) 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-bordeaux1.fr/~belabas/ F-33405 Talence (France) http://pari.math.u-bordeaux1.fr/ [PARI/GP] `