has anybody had experience with float calculation ( or just plain decimals ) with javascript...
here is an example:
Code:
<html>
<body>
<input type="text" name="abx" value="800" />
<input type="text" name="abz" value="1.12" />
<script language="javascript">
function testIt(){
var f1 = parseFloat(abx.value);
var f2 = parseFloat(abz.value);
var re = f1*f2;
alert("result: " + re);
}
</script>
<input type="button" onclick="testIt();" value="Click Me" />
</body>
</html>
you would, of course, expect to see "896.0" as the answer..
however if you try it you will get "896.00000000000001" ...
anyone know whats up with this and / or a mathematical work-around?