next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Parametrization :: modularSquareRoot

modularSquareRoot -- Compute the modular square root.



Computes the square root of a in $\mathbb{Z}/n\mathbb{Z}$

i1 : modularSquareRoot(626,1180943)

o1 = 832737
i2 : modularSquareRoot(3,13)

o2 = 4
i3 : modularSquareRoot(7,14)

o3 = 7
i4 : modularSquareRoot(3,14)

o4 = FAIL

o4 : Symbol


This should be extended slightly to non squarefree n. We use this function as we have to handle very large numbers. This function is no longer used, as we call Maple to compute the modular square root.

See also

Ways to use modularSquareRoot :

For the programmer

The object modularSquareRoot is a method function.