evalp - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

 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)$

 represents the p-adic number

$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({ⅇ}^{\frac{346347}{25}},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({\sum }_{k=1}^{\mathrm{∞}}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}kk!,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)
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 15, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}