[New-bugs-announce] [issue10337] testTanh() of test_math fails on "NetBSD 5 i386 3.x"

STINNER Victor report at bugs.python.org
Sat Nov 6 12:03:55 CET 2010

New submission from STINNER Victor <victor.stinner at haypocalc.com>:

On "NetBSD 5 i386 3.x" buildbot, testTanh() of test_math fails because the sign of wrong.

configure scripts has a test to check if tanh(-0.0) keeps the sign or no, and on this buildbot the result is "no". pyconfig.h contains a TANH_PRESERVES_ZERO_SIGN define, but it is not used in Modules/mathmodule.c. Extract of configure comment:

# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
# -0. on some architectures.


checking whether tanh preserves the sign of zero... no

FAIL: testTanh (test.test_math.MathTests)
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.smith-netbsd-i386/build/Lib/test/test_math.py", line 898, in testTanh
    math.copysign(1., -0.))
AssertionError: 1.0 != -1.0


components: Library (Lib)
messages: 120604
nosy: haypo
priority: normal
severity: normal
status: open
title: testTanh() of test_math fails on "NetBSD 5 i386 3.x"
versions: Python 3.1, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list