Message72391
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. |
|
Date |
User |
Action |
Args |
2008-09-03 16:18:23 | mark.dickinson | set | recipients:
+ mark.dickinson, djmdjm |
2008-09-03 16:18:23 | mark.dickinson | set | messageid: <1220458703.17.0.536919684212.issue3682@psf.upfronthosting.co.za> |
2008-09-03 16:18:22 | mark.dickinson | link | issue3682 messages |
2008-09-03 16:18:22 | mark.dickinson | create | |
|