"Source: Text/Ring/RngLoc.text";
"Line: 2399";
"Date: Fri Sep 26 14:29:19 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Ring/RngLoc.text, line: 2399
// Example: H49E14 ()
print "Example: H49E14";
ei := GetEchoInput();
SetEchoInput(true);
R<x> := PolynomialRing(Integers());
K<d> := ext<ext<pAdicField(5, 100) | 2> |  x^2 + 5>;
x := d + d^7;
x;
AbsolutePrecision(x);
assert $1 eq 200;
RelativePrecision(x);
assert $1 eq 199;
RelativePrecision(x + O(d^10));
assert $1 eq 9;
AbsolutePrecision(x + O(d^10));
assert $1 eq 10;
RelativePrecision(ChangePrecision(x, 19));
assert $1 eq 19;
RelativePrecision(ChangePrecision(x, 10));
assert $1 eq 10;
AbsolutePrecision(ChangePrecision(x, 10));
assert $1 eq 11;
Expand(ChangePrecision(x, 10));
Valuation(x);
assert $1 eq 1;
ChangePrecision(x, 20) - (x + O(d^21));  
SetEchoInput(ei);
