gmp_libmpf_clear Method |
Namespace: Math.Gmp.Native
public static void mpf_clear( mpf_t x )
Public Shared Sub mpf_clear ( x As mpf_t )
public: static void mpf_clear( mpf_t^ x )
static member mpf_clear : x : mpf_t -> unit
Make sure to call this function for all mpf_t variables when you are done with them.
// Set default precision to 64 bits. gmp_lib.mpf_set_default_prec(64U); // Create and initialize a new floating-point number x. mpf_t x = new mpf_t(); gmp_lib.mpf_init(x); // Assert that the value of x is 0.0. Assert.IsTrue(gmp_lib.mpf_get_d(x) == 0.0); // Release unmanaged memory allocated for x. gmp_lib.mpf_clear(x);
' Set default precision to 64 bits. gmp_lib.mpf_set_default_prec(64UI) ' Create and initialize a new floating-point number x. Dim x As New mpf_t() gmp_lib.mpf_init(x) ' Assert that the value of x is 0.0. Assert.IsTrue(gmp_lib.mpf_get_d(x) = 0.0) ' Release unmanaged memory allocated for x. gmp_lib.mpf_clear(x)
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.