homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients drkirkby, mark.dickinson, skrah
Date 2010年06月26日.17:11:33
SpamBayes Score 0.00025479117
Marked as misclassified No
Message-id <1277572295.99.0.918043204738.issue9069@psf.upfronthosting.co.za>
In-reply-to
Content
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 
History
Date User Action Args
2010年06月26日 17:11:36mark.dickinsonsetrecipients: + mark.dickinson, skrah, drkirkby
2010年06月26日 17:11:35mark.dickinsonsetmessageid: <1277572295.99.0.918043204738.issue9069@psf.upfronthosting.co.za>
2010年06月26日 17:11:34mark.dickinsonlinkissue9069 messages
2010年06月26日 17:11:33mark.dickinsoncreate

AltStyle によって変換されたページ (->オリジナル) /