Mark Dickinson <[EMAIL PROTECTED]> added the comment: Judging by the information at
http://docs.sun.com/app/docs/doc/802-1930-03/6i5u95u0i? l=en&a=view&q=matherr this behaviour is intentional. It looks like log(-inf) sets errno = EDOM and returns -inf. An IEEE 754 conforming math library would return NaN instead. I've no idea why the 64-bit build doesn't exhibit this problem. math_1 in Modules/mathmodule.c bases its error reporting primarily on return values, only looking at errno in the case when a finite value is returned. So it doesn't ever take any notice of the EDOM errno value. Unfortunately, changing this would likely cause failures on other machines. GNU libc is all over the place when it comes to setting errno: I recall finding that on one Linux machine, of the three calls atanh(1.), log(0.) and log10(0.), one of these sets errno = EDOM, one sets errno = ERANGE, and one doesn't set errno at all. (All three calls correspond to logarithmic singularities, and should all behave the same way.) One obvious solution is to write a matherr function for use on Solaris, as described on the man page above. Do you think you could have a go at this? ---------- priority: -> high _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3167> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com