numtheory(deprecated)/mroot - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : numtheory(deprecated)/mroot

numtheory(deprecated)

 mroot
 modular root

 Calling Sequence mroot(x, r, p)

Parameters

 x, r, p - integers

Description

 • Important: The numtheory package has been deprecated.  Use the superseding command NumberTheory[ModularRoot] instead.
 • The function mroot computes the rth root of x $\mathbf{mod}p$. It finds an integer y such that ${y}^{r}=x\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{mod}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}p$ if possible. Otherwise, it returns FAIL.
 • The order, r, of the root must be prime.
 • The command with(numtheory,mroot) allows the use of the abbreviated form of this command.

Examples

Important: The numtheory package has been deprecated.  Use the superseding command NumberTheory[ModularRoot] instead.

 > $\mathrm{with}\left(\mathrm{numtheory}\right):$
 > $\mathrm{mroot}\left(5,11,13\right)$
 ${8}$ (1)
 > $\mathrm{mroot}\left(2,3,6\right)$
 ${2}$ (2)

 See Also