gmp_libmpz_add_ui Method |
Namespace: Math.Gmp.Native
public static void mpz_add_ui( mpz_t rop, mpz_t op1, uint op2 )
Public Shared Sub mpz_add_ui ( rop As mpz_t, op1 As mpz_t, op2 As UInteger )
public: static void mpz_add_ui( mpz_t^ rop, mpz_t^ op1, unsigned int op2 )
static member mpz_add_ui : rop : mpz_t * op1 : mpz_t * op2 : uint32 -> unit
// Create, initialize, and set the value of x to 0. mpz_t x = new mpz_t(); gmp_lib.mpz_init(x); // Increment x twice by 101999. gmp_lib.mpz_add_ui(x, x, 101999U); gmp_lib.mpz_add_ui(x, x, 101999U); // Assert that x is 203998. Assert.IsTrue(gmp_lib.mpz_get_ui(x) == 203998U); // Release unmanaged memory allocated for x. gmp_lib.mpz_clear(x);
' Create, initialize, and set the value of x to 0. Dim x As New mpz_t() gmp_lib.mpz_init(x) ' Increment x twice by 101999. gmp_lib.mpz_add_ui(x, x, 101999UI) gmp_lib.mpz_add_ui(x, x, 101999UI) ' Assert that x is 203998. Assert.IsTrue(gmp_lib.mpz_get_ui(x) = 203998UI) ' Release unmanaged memory allocated for x. gmp_lib.mpz_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.