Sunday 25 September 2016

javascript division giving wrong answer?


alert(5.30/0.1);




This gives 52.99999999999999 but should be 53. Can anybody tell how and why?



I want to find that a number is divisible by a given number. Note that one of the number may be a float.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...