[issue3168] cmath test fails on Solaris 10

Jean Brouwers report at bugs.python.org
Sat Jun 28 21:14:44 CEST 2008


Jean Brouwers <MrJean1 at Gmail.com> added the comment:

This is pretty bizarre, take a look at the following, 64-bit Pyhon 2.6b1 
-xO5.

Python 2.6b1 (r26b1:64398, Jun 28 2008, 12:50:06) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> math.log(100.0, 2.0)
6.6438561897747253
>>> math.log(100.0) / math.log(2.0)
6.6438561897747253

>>> import cmath
>>> cmath.log(100.0, 2.0)
(0.71244151439608006-2.0556716794852954j)
>>> cmath.log(complex(100.0, 0), complex(2.0, 0)) 
(0.71244151439608006-2.0556716794852954j)

>>> cmath.log(2.0)
(0.69314718055994529+0j)
>>> cmath.log(100.0)
(4.6051701859880918+0j)
>>> cmath.log(100.0) / cmath.log(2.0)
(6.6438561897747253+0j)

There is only an issue with cmath.log(100.0, 2.0) but not with 
cmath.log(100.0) / cmath.log(2.0).  That seems to indicate that the 
c_quot function may be the root cause of the problem.

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


More information about the Python-bugs-list mailing list