Click or drag to resize
gmp_libmpq_clears Method
Free the space occupied by a NULL-terminated list of mpq_t variables.

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 mpq_clears(
	params mpq_t[] x
)

Parameters

x
Type: Math.Gmp.Nativempq_t
The operand rational.
Examples
// Create new rationals x1, x2 and x3.
mpq_t x1 = new mpq_t();
mpq_t x2 = new mpq_t();
mpq_t x3 = new mpq_t();

// Initialize the rationals.
gmp_lib.mpq_inits(x1, x2, x3, null);

// Assert that their value is 0.0.
Assert.IsTrue(gmp_lib.mpq_get_d(x1) == 0.0);
Assert.IsTrue(gmp_lib.mpq_get_d(x2) == 0.0);
Assert.IsTrue(gmp_lib.mpq_get_d(x3) == 0.0);

// Release unmanaged memory allocated for the rationals.
gmp_lib.mpq_clears(x1, x2, x3, null);
See Also