These functions compare elements from the same algebraic structure.
int element_is1(element_t n)-
Returns nonzero if
nis 1, zero otherwise. int element_is0(element_t n)-
Returns nonzero if
nis 0, zero otherwise. int element_cmp(element_t a,element_t b)-
Returns 0 if
aandbare the same, nonzero otherwise. int element_is_sqr(element_t a)-
Returns nonzero if
ais a perfect square (quadratic residue), zero otherwise. int element_sgn(element_t a)int element_sign(element_t a)-
If
ais zero, returns 0. For nozeroathe behaviour depends on the algebraic structure, but has the property that element_sgn(a) = -element_sgn(-a) and element_sgn(a) = 0 impliesa= 0 with overwhelming probability.