testBit -package:base

x `testBit` i is the same as x .&. bit n /= 0 In other words it returns True if the bit at offset @n is set. Can be implemented using testBitDefault if a is also an instance of Num.
x `testBit` i is the same as x .&. bit n /= 0 In other words it returns True if the bit at offset @n is set. Can be implemented using testBitDefault if a is also an instance of Num.
Return Just if every bitvector in the domain has the same bit at the given index.
Default implementation for testBit. Note that: testBitDefault x i = (x .&. bit i) /= 0
Test if n-th bit is set.
Like testBit, but takes a Natural for the bit index. If the index is out of bounds, return False.
Returns true if the corresponding bit in the bitvector is set.
BigNat bit test
BigNat bit test
Test if n-th bit is set. For negative Integers it tests the n-th bit of the negated argument. Fake 2's complement for negative values (might be slow)