GroupTheory
logp
compute the exponent of a prime power
Calling Sequence
Parameters
Description
Examples
logp( q )
q
-
: algebraic : an expression understood to represent a prime power
Suppose that is a power of a prime number . The calling sequence logp( q ) returns the exponent . This is equivalent to log[p]( q ), except that the base of the logarithm is not generally known in advance.
if is a complex numeric that is not a power of a prime number then an exception is raised.
Otherwise, logp returns unevaluated.
Note that logp( 1 ) = 0.
The following call results in an exception being raised as the argument is not a power of a prime number.
Error, (in GroupTheory:-logp) argument is not a prime power
See Also
ilog
ilog2
type/primepower
Download Help Document