user1647008
user1647008

Reputation: 343

How would you declare a large number in GMP?

How would you declare a large number that is 128 bits in GMP with the #include <gmp.h>? This number is an integer.

Upvotes: 1

Views: 953

Answers (1)

Keith Randall
Keith Randall

Reputation: 23265

Use mpz_set_str to initialize to an ascii value.

mpz_t N;
mpz_init(N);
mpz_set_str(N, "55555555555555555555555555555");

Upvotes: 3

Related Questions