gmp_lib.mpf_clears Method

GMP Native Interface for .NET

gmp_libmpf_clears Method
Free the space occupied by a NULL-terminated list of mpf_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 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 

Parameters

x
Type: Math.Gmp.Nativempf_t
The operand float.
Examples
// 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.

See Also