| 1 | initial version |
Here are some ways to do it:
sage: K.<a> = Qp(2).extension(x^3 +4*x^2 + 2, print_mode="terse")
sage: a^3
2097150 + 2097148*a^2 + O(a^63)
sage: K.<a> = Qp(2, print_mode='digits').extension(x^3 +4*x^2 + 2)
sage: (a^3).polynomial()
...111111111111111111100*x^2 + ...000000000000000000000*x + ...111111111111111111110
sage: V, from_V, to_V = K.vector_space()
sage: to_V(a^3)
(...111111111111111111110, ...000000000000000000000, ...111111111111111111100)
The print modes available are "series" (default), "val-unit", "terse", "digits" and "bars". When p > 2 you can also use the print_pos keyword to print using the range -(p-1)/2 .. (p-1)/2 instead of 0 .. p-1.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.