0

I am stuck in problem with JavaScript calculation. as below code shows;

$(function(){   
        console.log(17.8575 + 142.86); // actual 160.71750000000003 and expected 160.7175 
        console.log(47.62*3); // actual 142.85999999999999 and excepted 142.86
    });

and I dont want to use toFixed() function. How to come over this problem? Thanks in advance.

iTechOwl
  • 150
  • 11

0 Answers0