]> granicus.if.org Git - python/commit
Fix-up and clean-up docs for int.bit_length().
authorRaymond Hettinger <python@rcn.com>
Fri, 19 Dec 2008 09:11:49 +0000 (09:11 +0000)
committerRaymond Hettinger <python@rcn.com>
Fri, 19 Dec 2008 09:11:49 +0000 (09:11 +0000)
commitd3e18b7113a6704950d7657134d770066d9542c5
treeeadec4f0c5604068201ad8dd81a2004b97ff06cb
parent09027aac9d5101d0e15eac8ba3a5d60e5298f26c
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