numtheory(deprecated)
msqrt
modular square root
Calling Sequence
Parameters
Description
Examples
msqrt(x, n)
x, n
-
integers
Important: The numtheory package has been deprecated. Use the superseding command NumberTheory[ModularSquareRoot] instead.
The function msqrt will compute the square root of x modn. It finds an integer y such that y2=xmodn if possible, otherwise it returns FAIL.
The command with(numtheory,msqrt) allows the use of the abbreviated form of this command.
withnumtheory:
msqrt3,11
5
msqrt3,7
FAIL
See Also
msolve
NumberTheory[ModularSquareRoot]
numtheory(deprecated)[mroot]
Roots
Download Help Document