Hi zusammen,
mein Computer kann nicht rechnen!
IE 5 behauptet: 100 * 4.9 = 490.00000000000005
NS 4.03, Mozilla 0.8 und Opera 5 sind großzügiger: 100 * 4.9 = 490.00000000000006
Ist bestimmt ein altbekannter Bug, nur ich kenne ihn nicht. Kennt ihn sonst wer? Hier mein Testcode, falls jemand es probieren will:
<html>
<head>
<title>Rechentest</title>
<script type="text/javascript">
<!--
function rechentest() {
input = 100;
pr = 4.9;
alert('input: ' + input);
alert('pr: ' + pr);
alert('input * pr: ' + input * pr);
}
//-->
</script>
</head>
<body>
<a href="#" onClick="rechentest(); return false;">Rechentest</a>
</body>
</html>