gmp_libmpz_divisible_2exp_p Method |
Namespace: Math.Gmp.Native
public static int mpz_divisible_2exp_p( mpz_t n, mp_bitcnt_t b )
Public Shared Function mpz_divisible_2exp_p ( n As mpz_t, b As mp_bitcnt_t ) As Integer
public: static int mpz_divisible_2exp_p( mpz_t^ n, mp_bitcnt_t b )
static member mpz_divisible_2exp_p : n : mpz_t * b : mp_bitcnt_t -> int
n is divisible by 2^b if there exists an integer q satisfying n = q * 2^b.
// Create, initialize, and set the value of x to 10000. mpz_t x = new mpz_t(); gmp_lib.mpz_init_set_ui(x, 10000U); Assert.IsTrue(gmp_lib.mpz_divisible_2exp_p(x, 2U) > 0); // Release unmanaged memory allocated for x. gmp_lib.mpz_clear(x);
' Create, initialize, and set the value of x to 10000. Dim x As New mpz_t() gmp_lib.mpz_init_set_ui(x, 10000UI) Assert.IsTrue(gmp_lib.mpz_divisible_2exp_p(x, 2UI) > 0) ' 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.