浮点算术不总是 100% 精确浮点算术不总是 100% 精确<!DOCTYPE html><html><body> <h1>JavaScript 数字</h1> <p>浮点的算数并不总是 100% 精准:</p> <p id="demo"></p> <script>var x = 0.2 + 0.1;document.getElementById("demo").innerHTML = "0.2 + 0.1 = " + x;</script> </body></html>