cal problom double type cal

 

double a=1.7;
double b=1.6;
double c=a-b;
Alert(c);

the result is 0.99999999999999999987?

 
zdj231:

double a=1.7;
double b=1.6;
double c=a-b;
Alert(c);

the result is 0.99999999999999999987?


Is your result 0.99999999999999999987 or 0.099999999999999999987 ? Big different there.


 
onewithzachy:

Is your result 0.99999999999999999987 or 0.099999999999999999987 ? Big different there.


I supposed it was a typo.
Reason: