c++ - Bug? Comparison of doubles involving long double
- robert <robert_member pathlink.com> Dec 03 2003
#include <stdio.h>
#include <math.h>
int main(void)
{
double x, y;
long double z;
x = sqrt(1);
y = sqrt(2);
z = 0;
printf("y > x, the return value should be zero (false). It isn't.");
return y < (1? x : z);
}
Dec 03 2003








robert <robert_member pathlink.com>