Akkiraju Ivaturi

Akkiraju Ivaturi

  • NA
  • 8.7k
  • 4.2m

Silly arithmetic

Sep 7 2012 11:21 PM

Computers are meant to be good at arithmetic, aren't they? Why does this print "False"?


double d1 = 1.000001;
double d2 = 0.000001;

Console.WriteLine((d1-d2)==1.0); 


Answers (1)