MCPcopy Create free account
hub / github.com/eshirazi/python-with-braces / _nbits

Function _nbits

Lib/decimal.py:5481–5492  ·  view source on GitHub ↗

Number of bits in binary representation of the positive integer n, or 0 if n == 0.

(n, correction = {
        '0': 4, '1': 3, '2': 2, '3': 2,
        '4': 1, '5': 1, '6': 1, '7': 1,
        '8': 0, '9': 0, 'a': 0, 'b': 0,
        'c': 0, 'd': 0, 'e': 0, 'f': 0})

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

_power_exactMethod · 0.85
_iexpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected