[issue4506] 3.0 make test failures on Solaris 10

Skip Montanaro report at bugs.python.org
Thu Dec 4 16:49:42 CET 2008


Skip Montanaro <skip at pobox.com> added the comment:

Mark> If you have time, could you try the attached patch and report what
    Mark> gets printed when cmath.exp(710+1.5j) is called?  On my machine, I
    Mark> get:
    ...

Looks similar here:

    % ./python
    Python 3.0 (r30:67503, Dec  3 2008, 14:46:39)
    [GCC 4.2.2] on sunos5
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import cmath
    >>> cmath.exp(complex(710.0, 1.5))
    r.real, r.imag: 1.58027e+307, Inf
    Py_IS_INFINITY(r.real), Py_IS_INFINITY(r.imag): 0, 1
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OverflowError: math range error

If I then comment back out your two printf statements and recompile, it once
again fails to raise OverflowError:

    % ./python
    Python 3.0 (r30:67503, Dec  3 2008, 14:46:39)
    [GCC 4.2.2] on sunos5
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import cmath ; cmath.exp(complex(710.0, 1.5))
    (1.5802653829857376e+307+inf*j)

Very weird.  If I uncomment either of your printf statements OverflowError
seems to be raised as expected.  It's as if some register bit isn't being
set unless you reference r.real or r.imag multiple times.

Skip

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4506>
_______________________________________


More information about the Python-bugs-list mailing list