Adding a Javascript Float
Possible duplicate:
Is JavaScript math broken?
<html>
<body>
<script type="text/javascript">
var w = 0;
var weight1 = parseFloat("0.6");
var weight2 = parseFloat("0.3");
w = weight1 + weight2;
document.write("total weight: " + w);
</script>
</body>
</html>
Why is this seal 0.8999999999999999, not 0.90000000
+3
5 answers