cairo-vm-go
cairo-vm-go copied to clipboard
IsQuadResidue
Determines if a given number is a quadratic residue and calculates its square root accordingly.
Reference: https://github.com/starkware-libs/cairo-lang/blob/efa9648f57568aad8f8a13fbf027d2de7c63c2c0/src/starkware/cairo/common/math.cairo#L455
The main problem here is to implement is_quad_residue
function from the starkware.python
package. Maybe Legendre()
function from the Element
library used in the project will help with that