Precision: RngIntElt Default: 20
Given a prime number p, create the field Q_p of p-adic numbers. Unless explicitly defined with a different precision, elements are created with absolute precision equal to the standard precision of the field, which is 20 by default, and can be changed with the optional Precision argument. The only exception to this rule are integers and rational numbers with finite p-adic expansion, which, when coerced into the p-adic field, are created with infinite absolute precision.The function FieldOfFractions can be used if the p-adic ring Z_p has been created already.
The angle bracket notation can be used to assign a name to the `indeterminate': Qp<t> := pAdicField(p).
Given a prime number p, and a positive integer r, create the field Q_p of p-adic numbers with elements of fixed relative precision r (but arbitrary absolute precision).The angle bracket notation can be used to assign a name to the `indeterminate': Qp<t> := pAdicField(p, r).
> Qp<p> := pAdicField(5); > t := Qp ! -1; > t; -1 > s := Sqrt(t); > s; 2 + p + 2*p^2 + p^3 + 3*p^4 + 4*p^5 + 2*p^6 + 3*p^7 + 3*p^9 + 2*p^10 + 2*p^11 + 4*p^13 + p^14 + 3*p^15 + 2*p^16 + 4*p^17 + 4*p^19 + O(p^20) > s^2-t; O(p^20)Although t= - 1 was known with infinite precision, its square root is necessarily truncated. The default truncation is at 20 places. To get a more precise square root we could create t at 50 places precision.
> u := Sqrt( elt< Qp | -1, 50 > ); > u^2-t; O(p^50)Alternatively, we could have created the field with all its elements to 50 digits precision; this field precision can be changed once the field is created using AssertAttribute.
> AssertAttribute(Qp, "Precision", 50); > v := Sqrt( Qp ! -1 ); > v^2+1; O(p^50)In the field with finite precision, say 11, we can only get results with absolute precision 11.
> Qq<q> := pAdicField(5, 11); > t := Qq ! -1; > t; 4 + 4*5 + 4*5^2 + 4*5^3 + 4*5^4 + 4*5^5 + 4*5^6 + 4*5^7 + 4*5^8 + 4*5^9 + 4*5^10 + O(5^11) > Sqrt(t); 2 + 5 + 2*5^2 + 5^3 + 3*5^4 + 4*5^5 + 2*5^6 + 3*5^7 + 3*5^9 + 2*5^10 + O(5^11)
Precision: RngIntElt Default: 20
Given a prime number p, create the ring Z_p of p-adic numbers. Unless explicitly defined with a different precision, elements are created with absolute precision equal to the standard precision of the field, which is 20 by default, and can be changed with the optional Precision argument. The only exception to this rule are integers and rational elements having finite p-adic expansion, which, when coerced into the p-adic field, are created with infinite absolute precision.The function IntegerRing can be used if the p-adic field Z_p has been created already.
The angle bracket notation can be used to assign a name to the `indeterminate': Zp<t> := pAdicRing(p).
Precision: RngIntElt Default: 20
Given a prime number p, and a positive integer r, create the ring Z_p of p-adic numbers of fixed absolute precision r.[Next] [Prev] [Right] [Left] [Up] [Index] [Root]The angle bracket notation can be used to assign a name to the `indeterminate': Zp<t> := pAdicRing(p, r).