I am comparing two doubles like the following:
bool isbig = fabs(sin1 - sin(x)) > 0.000001;
if (isbig)
printf("fabs=%f, max=%f", fabs(sin1-sin(x)), 0.000001);
Now, for some reason it prints in the output:
fabs=0.000001, max=0.000001
Why doesn't the comparison work? The print should only work if the left side is bigger than the right, but in the print we can see the sides are equal. Can somebody help? Thanks