Raymond Hettinger <rhettin...@users.sourceforge.net> added the comment:

It is not a reasonable request for math float functions to produce exact 
integer values and there is some harm in making further alterations to the 
existing algorithm (the more you tweak it in one place, the more you create 
oddities somewhere else).

There may be a case for a separate math.log2() function but this has never been 
requested before, so it is a low priority.

If the docs for bit_length() bug you, I can change them.  They are meant to be 
the exact math definition of bit_length, not an executable exact result using 
limited precision floating point.   Those docs are trying to inform users about 
bit_length() and are not making a promise about the behavior of math.log().

If you're wanting exact log results for integer inputs and bases, the math 
module is going to disappoint you no matter what we do.  This is a 
limited-precision-floating-point fact of life.

----------
nosy: +rhettinger
priority: normal -> low

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9959>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to