[issue15477] test_cmath failures on OS X 10.8
Mark Dickinson
report at bugs.python.org
Sun Jul 29 00:17:23 CEST 2012
Mark Dickinson added the comment:
>>> math.log1p(0.0)
0.0
>>> math.log1p(-0.0)
0.0
Ah, that would do it, then. It looks as though the system's log1p function is buggy, in the sense that it doesn't follow C99 Annex F (F.9.3.9). It also doesn't agree with what 'man log1p' says on my OS X 10.6 Macbook: under 'SPECIAL VALUES', it says: 'log1p(+-0) returns +-0.'
I'm puzzled about one thing, though: there's a test for this problem in the configure script, and LOG1P_DROPS_ZERO_SIGN should be defined in this case---in that case, the two testAtanSign and testAtanhSign tests are skipped. So it looks as though LOG1P_DROPS_ZERO_SIGN isn't being defined on this machine; I'm not sure why---there may be a compiler optimization kicking in in the configure test. (Is this clang or gcc, BTW?)
So definitely worth a bug report, I'd say, though perhaps it's too much to hope for a fix within the lifetime of 10.8.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15477>
_______________________________________
More information about the Python-bugs-list
mailing list