[issue3168] cmath test fails on Solaris 10

Jean Brouwers report at bugs.python.org
Sun Jun 29 18:43:35 CEST 2008

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

I have not yet been able to duplicate the problem in a smaller test 
case, but I did stumble into a fix.  Changing the following statement in 
the cmath_log function from

	if (PyTuple_GET_SIZE(args) == 2)
		x = c_quot(x, c_log(y));


	if (PyTuple_GET_SIZE(args) == 2) {
		y = c_log(y);
		x = c_quot(x, y);

fixes the problem for the 64-bit -xO5 Python build.  The result is no 
the same in all 32- and 64-bit builds with -xO0 and -xO5 on Solaris 10 
(Opteron) with SUN C.

>>> cmath.log(100, 2)

>>> cmath.log(0.01, 0.5)

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list