Complement 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_combit(
mpz_t rop,
mp_bitcnt_t bit_index
)
Public Shared Sub mpz_combit (
rop As mpz_t,
bit_index As mp_bitcnt_t
)
public:
static void mpz_combit(
mpz_t^ rop,
mp_bitcnt_t bit_index
)
static member mpz_combit :
rop : mpz_t *
bit_index : mp_bitcnt_t -> unit
Parameters
- rop
- Type: Math.Gmp.Nativempz_t
The result integer. - bit_index
- Type: Math.Gmp.Nativemp_bitcnt_t
The index of the bit to comlpement.
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
mpz_t rop = new mpz_t();
gmp_lib.mpz_init_set_si(rop, 70);
gmp_lib.mpz_combit(rop, 3U);
Assert.IsTrue(gmp_lib.mpz_get_si(rop) == 78);
gmp_lib.mpz_clear(rop);
Dim rop As New mpz_t()
gmp_lib.mpz_init_set_si(rop, 70)
gmp_lib.mpz_combit(rop, 3UI)
Assert.IsTrue(gmp_lib.mpz_get_si(rop) = 78)
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