| Method | Return | Description |
x.is_zero() | Bool | True if value is 0 |
x.is_negative() | Bool | True if value < 0 |
x.is_positive() | Bool | True if value > 0 |
x.is_one() | Bool | True if value is 1 |
x.bit_length() | Int | Number of bits in the magnitude |
x.bit_count() | Int | Population count (number of set bits) |
x.number_of_words() | Int | Number of UInt64 words |
x.number_of_digits() | Int | Number of decimal digits |
var x = BInt(13)
print(x.bit_length()) # 4 (13 = 0b1101)
print(x.bit_count()) # 3 (three 1-bits)
print(x.number_of_digits()) # 2
print(x.is_positive()) # True