The field of $p$-adic numbers $\QQ_p$ consists of all formal Laurent series $$\sum_{n=\nu}^\infty a_n p^n = a_\nu p^\nu + a_{\nu+1} p^{\nu+1} + \cdots,$$ where $\nu \in \ZZ$ and $a_n \in \{0, \ldots, p - 1\}$, together with the usual operations of addition and multiplication in base $p$, with carrying that may continue indefinitely. Equivalently, $\QQ_p$ is the completion of $\QQ$ with respect to the $p$-adic absolute value $|x|_p = p^{-\nu_p(x)}$, just as $\RR$ is the completion of $\QQ$ under the usual absolute value.
Elements of $\QQ_p$ are created by applying a p-adic field family to a rational number. They are stored and displayed as truncated series, with a default precision of 20 base-$p$ digits.
|
This package is implemented using the ForeignFunctions package to call $p$-adic arithmetic routines from the FLINT C library.
See the paper Implementing p-adic numbers in Macaulay2 using its foreign function interface and FLINT for more information.
This documentation describes version 0.1 of Padic, released April 28, 2026.
If you have used this package in your research, please cite it as follows:
|
The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/Padic.m2:439:0.