numtheory/imagunit(deprecated) - Help

numtheory

 imagunit
 square root of -1 mod n

 Calling Sequence imagunit(n)

Parameters

 n - integer

Description

 • Important: The numtheory[imagunit] command has been deprecated.  Use the superseding command NumberTheory[ImaginaryUnit] instead.
 • The function imagunit will find a square root of $-1\mathbf{mod}n$, if possible, otherwise it returns FAIL.
 • The command with(numtheory,imagunit) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{numtheory}\right):$
 > $\mathrm{imagunit}\left(5\right)$
 ${2}$ (1)
 > $\mathrm{imagunit}\left(7\right)$
 ${\mathrm{FAIL}}$ (2)