Mark Dickinson <[EMAIL PROTECTED]> added the comment: 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. _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3682> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com