This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients jcea, mark.dickinson, rhettinger, vstinner
Date 2011-05-07.09:35:18
SpamBayes Score 6.268597e-08
Marked as misclassified No
Message-id <1304760914.13903.6.camel@marge>
In-reply-to <>
> 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.

Oh, I see:

    Various platforms (Solaris, OpenBSD) do nonstandard things for
    log(-ve), log(NaN).  Here are wrappers for log and log10 that deal
    special values directly, passing positive non-special values through
    the system

> 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.

Yes, we can use log2() only for the "x > 0.0" case. My secret plan was
to check system log2() using the buildbots. But if we know that system
log() only works correctly with strictly positive numbers, it's faster
to directly only use system log2() for x > 0.0.

Updated patch (version 3) implements that.
Date User Action Args
2011-05-07 09:35:19vstinnersetrecipients: + vstinner, rhettinger, jcea, mark.dickinson
2011-05-07 09:35:18vstinnerlinkissue11888 messages
2011-05-07 09:35:18vstinnercreate