Jeroen Demeyer on Thu, 09 Jan 2014 13:22:10 +0100


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

precp and valp for zero p-adics


Hello pari-dev,

it seems that p-adic numbers which equal zero (e.g. O(3^10)) are always created with precp=0. However, the manual doesn't really document the meaning of precp and valp for zero p-adic numbers.

A 3-adic zero with precp=10 and valp=0 is printed as O(3^10), exactly the same as precp=0 and valp=10 but the behaviour is different.

For example, trying to compute the poldisc() of
(1 + O(3^10))*x^3 + O(3^10)*x^2 + (1 + O(3^10))*x + (1 + O(3^10))
yields the wrong answer if the x^2 term has precp=10 and valp=0.

From this, I conclude that p-adic zero numbers should always have precp=0. Is this a correct conclusion? If yes, it should be documented better in the libpari manual.

Cheers,
Jeroen.