Next: , Previous: Calculations, Up: MPI library


10.5 Comparisons

The next 2 functions are used to compare MPIs:

— Function: int gcry_mpi_cmp (const gcry_mpi_t u, const gcry_mpi_t v)

Compare the multi-precision-integers number u and v returning 0 for equality, a positive value for u > v and a negative for u < v.

— Function: int gcry_mpi_cmp_ui (const gcry_mpi_t u, unsigned long v)

Compare the multi-precision-integers number u with the unsigned integer v returning 0 for equality, a positive value for u > v and a negative for u < v.