gmp_libmpz_divexact_ui Method |
Namespace: Math.Gmp.Native
public static void mpz_divexact_ui( mpz_t q, mpz_t n, uint d )
Public Shared Sub mpz_divexact_ui ( q As mpz_t, n As mpz_t, d As UInteger )
public: static void mpz_divexact_ui( mpz_t^ q, mpz_t^ n, unsigned int d )
static member mpz_divexact_ui : q : mpz_t * n : mpz_t * d : uint32 -> unit
// Create, initialize, and set the value of x to 10000. mpz_t x = new mpz_t(); gmp_lib.mpz_init_set_ui(x, 10000U); // Create, initialize, and set the value of z to 0. mpz_t z = new mpz_t(); gmp_lib.mpz_init(z); // Set z = x / 5. gmp_lib.mpz_divexact_ui(z, x, 5U); // Assert that z is 2000. Assert.IsTrue(gmp_lib.mpz_get_si(z) == 2000); // Release unmanaged memory allocated for x and z. gmp_lib.mpz_clears(x, z, null);
' Create, initialize, and set the value of x to 10000. Dim x As New mpz_t() gmp_lib.mpz_init_set_ui(x, 10000UI) ' Create, initialize, and set the value of z to 0. Dim z As New mpz_t() gmp_lib.mpz_init(z) ' Set z = x / 5. gmp_lib.mpz_divexact_ui(z, x, 5UI) ' Assert that z is 2000. Assert.IsTrue(gmp_lib.mpz_get_si(z) = 2000) ' Release unmanaged memory allocated for x and z. gmp_lib.mpz_clears(x, z, 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.