Hello,
The documentation for component(x,n) gives an example:
? x = 3 + O(3^5);
? component(x, 2)
%2 = 81 \\ p^(p-adic accuracy)
This example does work as stated, however for p=2 the behavior is different:
? x = 4 + O(2^3)
%1 = 2^2 + O(2^3)
? component(x,2)
%2 = 2
? x.mod
%3 = 2
So, both component(x,2) and x.mod here give 2 instead of 8. Is this a bug?
Speaking along these lines, what would the easiest way to covert t_PADIC to t_INTMOD?
I was thinking about Mod(lift(x),x.mod), but because of the aforementioned behavior the safe way seems to be Mod(lift(x),x.p^padicprec(x,x.p)). Is there a more straightforward way?
Thanks,
Max
P.S. Just in case, I use GP/PARI CALCULATOR Version 2.12.1 (development 23999-918d8bb62) at the moment.