www.digitalmars.com         C & C++   DMDScript  

c++ - Bug? Comparison of doubles involving long double

#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