Click or drag to resize
gmp_libmpf_set_z 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 mpf_set_z(
	mpf_t rop,
	mpz_t op
)

Parameters

rop
Type: Math.Gmp.Nativempf_t
The result float.
op
Type: Math.Gmp.Nativempz_t
The operand.
Examples
// Create, initialize, and set a new integer y to 200.
mpz_t y = new mpz_t();
gmp_lib.mpz_init(y);
gmp_lib.mpz_set_ui(y, 200U);

// Create, initialize, and set a new floating-point number x to y.
mpf_t x = new mpf_t();
gmp_lib.mpf_init(x);
gmp_lib.mpf_set_z(x, y);

// Assert that x is 200.
Assert.IsTrue(x.ToString() == "0.2e3");

// Release unmanaged memory allocated for x and y.
gmp_lib.mpf_clear(x);
gmp_lib.mpz_clear(y);
See Also