gmp_libmpz_pow_ui Method |
Namespace: Math.Gmp.Native
public static void mpz_pow_ui( mpz_t rop, mpz_t base, uint exp )
Public Shared Sub mpz_pow_ui ( rop As mpz_t, base As mpz_t, exp As UInteger )
public: static void mpz_pow_ui( mpz_t^ rop, mpz_t^ base, unsigned int exp )
static member mpz_pow_ui : rop : mpz_t * base : mpz_t * exp : uint32 -> unit
// Create, initialize, and set the value of base to 2. mpz_t @base = new mpz_t(); gmp_lib.mpz_init_set_ui(@base, 2U); // Create, initialize, and set the value of rop to 0. mpz_t rop = new mpz_t(); gmp_lib.mpz_init(rop); // Set rop = base^4. gmp_lib.mpz_pow_ui(rop, @base, 4U); // Assert that rop is 16. Assert.IsTrue(gmp_lib.mpz_get_si(rop) == 16); // Release unmanaged memory allocated for rop and base. gmp_lib.mpz_clears(rop, @base, null);
' Create, initialize, and set the value of base to 2. Dim base As New mpz_t() gmp_lib.mpz_init_set_ui(base, 2UI) ' Create, initialize, and set the value of rop to 0. Dim rop As New mpz_t() gmp_lib.mpz_init(rop) ' Set rop = base^4. gmp_lib.mpz_pow_ui(rop, base, 4UI) ' Assert that rop is 16. Assert.IsTrue(gmp_lib.mpz_get_si(rop) = 16) ' Release unmanaged memory allocated for rop and base. gmp_lib.mpz_clears(rop, base, 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.