Skip to content

Instantly share code, notes, and snippets.

@maidis
Created June 1, 2020 13:05
Show Gist options
  • Save maidis/b23dd236a18807fc4ea47877c01369b9 to your computer and use it in GitHub Desktop.
Save maidis/b23dd236a18807fc4ea47877c01369b9 to your computer and use it in GitHub Desktop.
gmpxx3.cpp
#include <iostream>
#include <gmpxx.h>
int main (void)
{
mpz_t z;
mpz_init_set_str (z, "100", 0);
mpz_class x(z);
mpz_class y;
y = mpz_class(z);
std::cout << "x: " << x << '\n'
<< "y: " << y << '\n'
<< "z: " << z << '\n';
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment