GMP Native Interface for .NET
gmp_libmpz_ui_pow_ui Method |
Set rop to base^exp. The case 0^0 yields 1.
Namespace: Math.Gmp.Native
Assembly: Math.Gmp.Native (in Math.Gmp.Native.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static void mpz_ui_pow_ui( mpz_t rop, uint base, uint exp )
Public Shared Sub mpz_ui_pow_ui ( rop As mpz_t, base As UInteger, exp As UInteger )
public: static void mpz_ui_pow_ui( mpz_t^ rop, unsigned int base, unsigned int exp )
static member mpz_ui_pow_ui : rop : mpz_t * base : uint32 * exp : uint32 -> unit
Parameters
- rop
- Type: Math.Gmp.Nativempz_t
The result integer. - base
- Type: SystemUInt32
The base integer. - exp
- Type: SystemUInt32
The exponent integer.
Examples
// Create, initialize, and set the value of rop to 0. mpz_t rop = new mpz_t(); gmp_lib.mpz_init(rop); // Set rop = 2^4. gmp_lib.mpz_ui_pow_ui(rop, 2U, 4U); // Assert that rop is 16. Assert.IsTrue(gmp_lib.mpz_get_si(rop) == 16); // Release unmanaged memory allocated for rop. gmp_lib.mpz_clear(rop);
' Create, initialize, and set the value of rop to 0. Dim rop As New mpz_t() gmp_lib.mpz_init(rop) ' Set rop = 2^4. gmp_lib.mpz_ui_pow_ui(rop, 2UI, 4UI) ' Assert that rop is 16. Assert.IsTrue(gmp_lib.mpz_get_si(rop) = 16) ' Release unmanaged memory allocated for rop. gmp_lib.mpz_clear(rop)
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.
See Also