Next: Bit manipulations, Previous: Calculations, Up: MPI library [Contents][Index]
The next 2 functions are used to compare MPIs:
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. If both numbers are opaque values (cf, gcry_mpi_set_opaque) the comparison is done by checking the bit sizes using memcmp. If only one number is an opaque value, the opaque value is less than the other number.
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.
Return 1 if a is less than zero; return 0 if zero or positive.