Can any one give me an idea for compare these two values in double data type.
I hope this if check always gets FALSE, Unfortunately It is TRUE condition. IF you know any solution,Plz suggest to me.
# include <stdio.h>
int main()
{
double g = 51.200000000000007;
double h = 51.200000000000001;
if((g)>(h))
{
printf("%lf",h);
}
g=g;
h=h;
printf("%lf",g);
return 0;
}
Output:
51.200000
51.200000