GMP Native Interface for .NET
gmp_libmpz_inits Method |
Initialize a NULL-terminated list of mpz_t variables, and set their values to 0.
Namespace: Math.Gmp.Native
Assembly: Math.Gmp.Native (in Math.Gmp.Native.dll) Version: 1.0.0.0 (1.0.0.0)

public static void mpz_inits( params mpz_t[] x )
Public Shared Sub mpz_inits ( ParamArray x As mpz_t() )
public: static void mpz_inits( ... array<mpz_t^>^ x )
static member mpz_inits : x : mpz_t[] -> unit
Parameters
- x
- Type: Math.Gmp.Nativempz_t
A NULL-terminated list of mpz_t variables.

// Create new integers x1, x2 and x3. mpz_t x1 = new mpz_t(); mpz_t x2 = new mpz_t(); mpz_t x3 = new mpz_t(); // Initialize the integers. gmp_lib.mpz_inits(x1, x2, x3, null); // Assert that their value is 0. Assert.IsTrue(gmp_lib.mpz_get_si(x1) == 0); Assert.IsTrue(gmp_lib.mpz_get_si(x2) == 0); Assert.IsTrue(gmp_lib.mpz_get_si(x3) == 0); // Release unmanaged memory allocated for the integers. gmp_lib.mpz_clears(x1, x2, x3, null);
' Create new integers x1, x2 and x3. Dim x1 As New mpz_t() Dim x2 As New mpz_t() Dim x3 As New mpz_t() ' Initialize the integers. gmp_lib.mpz_inits(x1, x2, x3, Nothing) ' Assert that their value is 0. Assert.IsTrue(gmp_lib.mpz_get_si(x1) = 0) Assert.IsTrue(gmp_lib.mpz_get_si(x2) = 0) Assert.IsTrue(gmp_lib.mpz_get_si(x3) = 0) ' Release unmanaged memory allocated for the integers. gmp_lib.mpz_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.
