[issue9069] test_float failure on Solaris
Mark Dickinson
report at bugs.python.org
Sat Jun 26 19:11:36 CEST 2010
Mark Dickinson <dickinsm at gmail.com> added the comment:
Here's some minimal failing code.
// Compile with:
// gcc-4.4 -m64 -fno-inline -g -O3 copysign_bug.c -o copysign_bug
#include <math.h>
#include <stdio.h>
int copysign_bug(double x)
{
if (x && (x * 0.5 == x))
return 1;
if (copysign(1.0, x) < 0.0)
return 2;
else
return 3;
}
int main(void) {
double x;
x = -0.0;
printf("copysign_bug(%.17g) = %d\n", x, copysign_bug(x));
x = 0.0;
printf("copysign_bug(%.17g) = %d\n", x, copysign_bug(x));
return 0;
}
This produces the output:
copysign_bug(-0) = 3
copysign_bug(0) = 3
I would expecting to see:
copysign_bug(-0) = 2
copysign_bug(0) = 3
I've reported this at:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44683
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9069>
_______________________________________
More information about the Python-bugs-list
mailing list