parseFloat problems in Internet Explorer

Feb 28 2019 5:59 AM
 Hallo Team,
 
I have this piece of code from JQuery:
 
GetTripCosts: function () {
 
var km = $("#input_km").val();
 
var entire_Km = (km * 0.30).toFixed(2);
 
if (!isNaN(parseFloat(entire_Km))) {
 
        $("#input_entire").val(entire_Km.replace(".", ","));
 
       }
},
 
in Chrome: I put for example 55,88 in the input feld and I get result 55,88 * 0,30 = 16,76
 
in Internet Explorer the same calculation I get as result 16,50 rather then 16,76 like in Chrome.
 
If i put the number 55.88 with point comma rather then 55,88 then I get also in Internet Explorer the right result 16,76.
 
My question is: does it depend on the parseFloat? 
Because I'm not sure that the problem regards the replace method.
 
I would appreciate some help and suggestions?
 
Thank you in advance. 

Answers (3)