gmp_libmpz_addmul_ui Method |
Namespace: Math.Gmp.Native
public static void mpz_addmul_ui( mpz_t rop, mpz_t op1, uint op2 )
Public Shared Sub mpz_addmul_ui ( rop As mpz_t, op1 As mpz_t, op2 As UInteger )
public: static void mpz_addmul_ui( mpz_t^ rop, mpz_t^ op1, unsigned int op2 )
static member mpz_addmul_ui : rop : mpz_t * op1 : mpz_t * op2 : uint32 -> unit
// Create, initialize, and set the value of x to -10000. mpz_t x = new mpz_t(); gmp_lib.mpz_init_set_si(x, -10000); // Create, initialize, and set the value of z to 20000. mpz_t z = new mpz_t(); gmp_lib.mpz_init_set_si(z, 20000); // Set z += x * 12222. gmp_lib.mpz_addmul_ui(z, x, 12222U); // Assert that z has been incremented by -10000 * 12222. Assert.IsTrue(gmp_lib.mpz_get_si(z) == 20000 + -10000 * 12222); // 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_si(x, -10000) ' Create, initialize, and set the value of z to 20000. Dim z As New mpz_t() gmp_lib.mpz_init_set_si(z, 20000) ' Set z += x * 12222. gmp_lib.mpz_addmul_ui(z, x, 12222UI) ' Assert that z has been incremented by -10000 * 12222. Assert.IsTrue(gmp_lib.mpz_get_si(z) = 20000 + -10000 * 12222) ' 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.