gmp_libmpq_clears Method |
Namespace: Math.Gmp.Native
public static void mpq_clears( params mpq_t[] x )
Public Shared Sub mpq_clears ( ParamArray x As mpq_t() )
public: static void mpq_clears( ... array<mpq_t^>^ x )
static member mpq_clears : x : mpq_t[] -> unit
// 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);
' Create new rationals x1, x2 and x3. Dim x1 As New mpq_t() Dim x2 As New mpq_t() Dim x3 As New mpq_t() ' Initialize the rationals. gmp_lib.mpq_inits(x1, x2, x3, Nothing) ' 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, Nothing)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.