JavaScript中的Number.EPSILON属性
Number对象的Number.EPSILON属性表示1与大于1的最小浮点数之间的差。
语法
其语法如下
Number.EPSILON
示例
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result = Number.EPSILON;
document.write("Value of the epsilon : " + result);
</script>
</body>
</html>输出结果
Value of the epsilon: 2.220446049250313e-16