Macaulay2 » Documentation
Packages » A1BrouwerDegrees :: getPadicValuation
next | previous | forward | backward | up | index | toc

getPadicValuation -- p-adic valuation of a rational number

Description

This function computes the $p$-adic valuation of a rational number $a$, which is the exponent of the prime $p$ in the factorization of $a$ in $\mathbb{Q}_p$. It returns the integer $n$ such that $a=up^{n}$, where $u$ is a unit in $\mathbb{Z}_p$.

i1 : a = 363/7;
i2 : getPadicValuation(a, 11)

o2 = 2

We have that $363/7 = \frac{3\cdot 11^{2}}{7}$, so the $11$-adic valuation is $2$.

Ways to use getPadicValuation:

  • getPadicValuation(QQ,ZZ)
  • getPadicValuation(ZZ,ZZ)

For the programmer

The object getPadicValuation is a method function.


The source of this document is in A1BrouwerDegrees/Documentation/ArithmeticMethodsDoc.m2:27:0.