Click or drag to resize
gmp_libmpz_clrbit Method
Clear bit bit_index in rop.

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_clrbit(
	mpz_t rop,
	mp_bitcnt_t bit_index
)

Parameters

rop
Type: Math.Gmp.Nativempz_t
The result integer.
bit_index
Type: Math.Gmp.Nativemp_bitcnt_t
The index of the bit to clear.
Remarks

The function behaves as if twos complement arithmetic were used (although sign-magnitude is the actual implementation). The least significant bit is number 0.

Examples
// Create, initialize, and set the value of rop to 70.
mpz_t rop = new mpz_t();
gmp_lib.mpz_init_set_si(rop, 70);

// Clear bit 3 of rop.
gmp_lib.mpz_clrbit(rop, 3U);

// Assert that rop is 70.
Assert.IsTrue(gmp_lib.mpz_get_si(rop) == 70);

// Release unmanaged memory allocated for rop.
gmp_lib.mpz_clear(rop);
See Also