• Raymond Hettinger's avatar
    Fix-up and clean-up docs for int.bit_length(). · d3e18b71
    Raymond Hettinger authored
    * Replace dramatic footnote with in-line comment about possible round-off errors in logarithms of large numbers.
    * Add comments to the pure python code equivalent.
    * replace floor() with int() in the mathematical equivalent so the type is correct (should be an int, not a float).
    * add abs() to the mathematical equivalent so that it matches the previous line that it is supposed to be equivalent to.
    * make one combined example with a negative input.
    d3e18b71
stdtypes.rst 103 KB