up previous next
valuation

p-adic valuation

Syntax
valuation(p: INT, N: INT): INT

Description
This function determines the p-adic valuation of a non-zero integer: the largest integer k such that power(p,k) divides N. The first argument is the prime p.

Example
/**/ valuation(5,10);
1

See Also