(n)
Calculate bit size of the nonnegative integer n.
Calculate bit size of the nonnegative integer n.
Calculate bit size of the nonnegative integer n .
def gmpy_bitcount(n):
    """Calculate bit size of the nonnegative integer n."""
    if n: return MPZ(n).numdigits(2)
    else: return 0
def gmpy_bitcount ( n ) : if n : return MPZ ( n ) . numdigits ( 2 ) else : return 0