Mark Dickinson <dicki...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue9069> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com