<!DOCTYPE html>
<html>
<body>
<p>Floating point arithmetic is not always 100% accurate.</p>
<p>But it helps to multiply and divide.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = (0.2*10 + 0.1*10) / 10;
document.getElementById("demo").innerHTML = "0.2 + 0.1 = " + x;
}
</script>
</body>
</html>