src/intobject/bit_length

Search:
Group by:
Source   Edit  

Procs

proc bit_count(self: IntObject): IntObject {....raises: [], tags: [], forbids: [].}
equiv to countSetBits/popcount in std/bitops, but for IntObject Source   Edit  
proc bit_length(self: IntObject): IntObject {....raises: [], tags: [], forbids: [].}
int_bit_length_impl Source   Edit  
proc byteCount(v: IntObject): int64 {....raises: [], tags: [], forbids: [].}
returns the number of bytes necessary to represent the absolute value of the integer in binary. Source   Edit  
proc digitCount(v: IntObject): int {.inline, ...raises: [], tags: [], forbids: [].}
_PyLong_DigitCount Source   Edit  
proc numbits(v: IntObject): int64 {....raises: [], tags: [], forbids: [].}

_PyLong_NumBits

returns the number of bits necessary to represent the absolute value of the integer in binary, excluding the sign and leading zeros.

Source   Edit