 evalp - Maple Help

 evalp Calling Sequence evalp(ex, p, s) evalp(ex, p) evalp(ex) Parameters

 ex - expression of rational numbers and/or p-adic numbers p - (optional) prime number or positive integer s - (optional) positive integer Description

 • 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,

$\mathrm{PADIC}\left(\mathrm{p_adic}\left(3,-2,\left[2,1,2,1,1,2,1\right]\right)\right)$

$2{3}^{-2}+{3}^{-1}+2+3+{3}^{2}+2{3}^{3}+\mathrm{O}\left({3}^{4}\right)$

 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. Examples

 > $\mathrm{with}\left(\mathrm{padic}\right):$
 > $a≔\mathrm{evalp}\left(\mathrm{exp}\left(\frac{346347}{25}\right),3\right)$
 ${a}{≔}{1}{+}{2}{}{{3}}^{{2}}{+}{{3}}^{{3}}{+}{{3}}^{{4}}{+}{{3}}^{{5}}{+}{2}{}{{3}}^{{6}}{+}{O}{}\left({{3}}^{{9}}\right)$ (1)
 > $b≔\mathrm{evalp}\left(\mathrm{RootOf}\left(2{x}^{3}+2x-1\right),3\right)$
 ${b}{≔}{1}{+}{3}{+}{2}{}{{3}}^{{3}}{+}{{3}}^{{4}}{+}{{3}}^{{5}}{+}{{3}}^{{7}}{+}{O}{}\left({{3}}^{{9}}\right)$ (2)
 > $\mathrm{evalp}\left({a}^{b},3\right)$
 ${1}{+}{2}{}{{3}}^{{2}}{+}{{3}}^{{6}}{+}{2}{}{{3}}^{{7}}{+}{O}{}\left({{3}}^{{9}}\right)$ (3)
 > $\mathrm{evalp}\left(\mathrm{log}\left(\right)\right)$
 ${2}{}{{3}}^{{2}}{+}{{3}}^{{4}}{+}{{3}}^{{5}}{+}{{3}}^{{8}}{+}{{3}}^{{9}}{+}{O}{}\left({{3}}^{{11}}\right)$ (4)
 > $\mathrm{Digitsp}≔15$
 ${\mathrm{Digitsp}}{≔}{15}$ (5)
 > $\mathrm{evalp}\left(\mathrm{Sum}\left(kk!,k=1..\mathrm{\infty }\right),7\right)$
 ${6}{+}{6}{}{7}{+}{6}{}{{7}}^{{2}}{+}{6}{}{{7}}^{{3}}{+}{6}{}{{7}}^{{4}}{+}{6}{}{{7}}^{{5}}{+}{6}{}{{7}}^{{6}}{+}{6}{}{{7}}^{{7}}{+}{6}{}{{7}}^{{8}}{+}{6}{}{{7}}^{{9}}{+}{6}{}{{7}}^{{10}}{+}{6}{}{{7}}^{{11}}{+}{6}{}{{7}}^{{12}}{+}{6}{}{{7}}^{{13}}{+}{O}{}\left({{7}}^{{14}}\right)$ (6)