gmp_libmpf_clears Method |
Namespace: Math.Gmp.Native
public static void mpf_clears( params mpf_t[] x )
Public Shared Sub mpf_clears ( ParamArray x As mpf_t() )
public: static void mpf_clears( ... array<mpf_t^>^ x )
static member mpf_clears : x : mpf_t[] -> unit
// Create new floating-point numbers x1, x2 and x3. mpf_t x1 = new mpf_t(); mpf_t x2 = new mpf_t(); mpf_t x3 = new mpf_t(); // Initialize the floating-point numbers. gmp_lib.mpf_inits(x1, x2, x3, null); // Assert that their value is 0. Assert.IsTrue(gmp_lib.mpf_get_d(x1) == 0.0); Assert.IsTrue(gmp_lib.mpf_get_d(x2) == 0.0); Assert.IsTrue(gmp_lib.mpf_get_d(x3) == 0.0); // Release unmanaged memory allocated for the floating-point numbers. gmp_lib.mpf_clears(x1, x2, x3, null);
' Create new floating-point numbers x1, x2 and x3. Dim x1 As New mpf_t() Dim x2 As New mpf_t() Dim x3 As New mpf_t() ' Initialize the floating-point numbers. gmp_lib.mpf_inits(x1, x2, x3, Nothing) ' Assert that their value is 0. Assert.IsTrue(gmp_lib.mpf_get_d(x1) = 0.0) Assert.IsTrue(gmp_lib.mpf_get_d(x2) = 0.0) Assert.IsTrue(gmp_lib.mpf_get_d(x3) = 0.0) ' Release unmanaged memory allocated for the floating-point numbers. gmp_lib.mpf_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.