Click or drag to resize
gmp_libmpz_set Method
Set the value of rop from op.

Namespace:  Math.Gmp.Native
Assembly:  Math.Gmp.Native (in Math.Gmp.Native.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static void mpz_set(
	mpz_t rop,
	mpz_t op
)

Parameters

rop
Type: Math.Gmp.Nativempz_t
The destination integer.
op
Type: Math.Gmp.Nativempz_t
The source integer.
Examples
// Create, initialize, and set a new integer x to 10.
mpz_t x = new mpz_t();
gmp_lib.mpz_init(x);
gmp_lib.mpz_set_si(x, 10);

// Create, initialize, and set a new integer y to -210.
mpz_t y = new mpz_t();
gmp_lib.mpz_init(y);
gmp_lib.mpz_set_si(y, -210);

// Assign the value of y to x.
gmp_lib.mpz_set(x, y);

// Assert that the value of x is -210.
Assert.IsTrue(gmp_lib.mpz_get_si(x) == -210);

// Release unmanaged memory allocated for x and y.
gmp_lib.mpz_clears(x, y, null);
See Also