pantry/projects/gnu.org/gmp/test.c

13 lines
233 B
C
Raw Normal View History

2022-09-01 02:04:25 +03:00
#include <gmp.h>
#include <stdlib.h>
int main() {
mpz_t i, j, k;
mpz_init_set_str (i, "1a", 16);
mpz_init (j);
mpz_init (k);
mpz_sqrtrem (j, k, i);
if (mpz_get_si (j) != 5 || mpz_get_si (k) != 1) abort();
return 0;
}