padic
evalp
p-adic evaluation
Calling Sequence
Parameters
Description
Examples
evalp(ex, p, s)
evalp(ex, p)
evalp(ex)
ex
-
expression of rational numbers and/or p-adic numbers
p
(optional) prime number or positive integer
s
(optional) positive integer
This function computes the p-adic value of the expression ex.
The parameter s sets the size of the resulting expression, where "size" means the number of terms of the p-adic number which will be printed. If omitted, it defaults to the value of the global variable Digitsp, which is initially assigned the value 10.
The expression ex can contain any of the operations +, -, *, /, ^, and any of the functions defined in the padic package. See padic/functions.
If the second and third arguments are omitted, then the expression ex must be a p-adic number.
If the result of the computation is not convergent in the p-adic field, then the routine returns FAIL.
A p-adic number x is represented in Maple using the unevaluated function call PADIC() whose argument is another unevaluated function call of the form p_adic(pp, s, l) where pp is the prime p, s is the p-adic order of x, and l is the list of coefficients. For example,
PADIC⁡p_adic⁡3,−2,2,1,2,1,1,2,1
represents the p-adic number
2⁢3−2+3−1+2+3+32+2⁢33+O34
The print routine print/PADIC is used by the prettyprinter to format the p-adic number on screen.
The command with(padic,evalp) allows the use of the abbreviated form of this command.
with⁡padic:
a≔evalp⁡exp⁡34634725,3
a≔1+2⁢32+33+34+35+2⁢36+O⁡39
b≔evalp⁡RootOf⁡2⁢x3+2⁢x−1,3
b≔1+3+2⁢33+34+35+37+O⁡39
evalp⁡ab,3
1+2⁢32+36+2⁢37+O⁡39
evalp⁡log⁡
2⁢32+34+35+38+39+O⁡311
Digitsp≔15
evalp⁡Sum⁡k⁢k!,k=1..∞,7
6+6⁢7+6⁢72+6⁢73+6⁢74+6⁢75+6⁢76+6⁢77+6⁢78+6⁢79+6⁢710+6⁢711+6⁢712+6⁢713+O⁡714
See Also
padic/functions
padic[ordp]
padic[ratvaluep]
padic[rootp]
Download Help Document