[issue11888] Add C99's log2() function to the math library

Mark Dickinson report at bugs.python.org
Fri May 6 20:12:44 CEST 2011


Mark Dickinson <dickinsm at gmail.com> added the comment:

Thanks, Victor.  I suspect we're going to need to be a bit more careful, though:  when the extra tests were added for math.log, it turned out that it had all sorts of strange special-case behaviour on various platforms.

So I suspect that even on platforms that have log2 natively, it'll be necessary to factor out special cases and deal with those first, only passing positive finite floats onto the system log2.  Take a look at m_log and the comment directly above it to see how that works.

I'd also like to check in the non-system version first, just to give it a thorough test on the buildbots, before adding in the version that uses the system log2 when available.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11888>
_______________________________________


More information about the Python-bugs-list mailing list