Wednesday, October 28, 2015

( 0.1 + 0.2 ) - 0.3 = 5.55111512312578E-17


Puzzling looking at the title!!!!

Lets look at this code
var a =(0.1 + 0.2) - 0.3;
Console.WriteLine("a = "+ a);

I am sure you are expecting "0" but its not.

It is 5.55111512312578E-17

check my fiddle here Open my Fiddle