I'm using Chrome, version 37.0.2062.124 m, and FireFox 22.0 and the computation gives me wrong result:
5*0.1 //the result is 0.5
6*0.1 //the result is 0.6000000000000001, it should be 0.6
7*0.1 //0.7000000000000001
8*0.1 //0.8
If possible to answer, how did they come up with this? If not, is there any library that does the job? I don't need new data type, float
is enough, I just want this to get the correct result.