]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Fix-up and clean-up docs for int.bit_length().
authorRaymond Hettinger <python@rcn.com>
Fri, 19 Dec 2008 09:06:07 +0000 (09:06 +0000)
committerRaymond Hettinger <python@rcn.com>
Fri, 19 Dec 2008 09:06:07 +0000 (09:06 +0000)
commitba666a59db2e90fec979e40789d70ba774f38ab6
tree08fe65ff83231207c2bea162f539e5040dc4358f
parent2b97b71b6f22abe4e4208226580eb2da403a66ca
Fix-up and clean-up docs for int.bit_length().

* 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.
Doc/library/stdtypes.rst