var factor=2.38; alert('str '+factor+' - '+Math.floor(factor)+' = '+(factor-Math.floor(factor)));
str 2.38 - 2 = 0.3799999999999999
alert(2.38-2);
alert((2.38-2).toFixed(2));