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 mark.dickinson
Recipients djmdjm, mark.dickinson
Date 2008-09-03.16:18:22
SpamBayes Score 7.530384e-06
Marked as misclassified No
Message-id <1220458703.17.0.536919684212.issue3682@psf.upfronthosting.co.za>
In-reply-to
Content
It's possible that this patch would cause breakage on other systems: 
there's a reason that errno is currently ignored, which is that it can't
be trusted on all systems (notably Linux: on one Linux system I've used
of three different evaluations, all of log singularity type (log(0),
log1p(-1), atanh(1), ...), one gave errno=EDOM, one gave errno=ERANGE,
and one didn't set errno at all).

So I'm reluctant to mess with math_1, especially this close to a release.

An alternative solution would be to check special cases for log directly
within the mathmodule.c code, only passing positive nonspecial arguments
to the system log function.  This would have a much lower risk of
causing breakage on other systems.  Note that Solaris with Sun's
compiler also has some problems with log:  depending on compiler
options, etc., log(-1.0) can give -inf instead of nan.  So having Python
deal with log special cases directly seems like a good thing to do there
as well.
History
Date User Action Args
2008-09-03 16:18:23mark.dickinsonsetrecipients: + mark.dickinson, djmdjm
2008-09-03 16:18:23mark.dickinsonsetmessageid: <1220458703.17.0.536919684212.issue3682@psf.upfronthosting.co.za>
2008-09-03 16:18:22mark.dickinsonlinkissue3682 messages
2008-09-03 16:18:22mark.dickinsoncreate