JavaScript 中的 Number.EPSILON 属性
htmljavascriptweb developmentfront end technology更新于 2024/10/13 6:04:17
Number 对象的 Number.EPSILON 属性表示 1 与大于 1 的最小浮点数之间的差值。
语法
其语法如下
Number.EPSILON
示例
<html>
<head>
<title>JavaScript 示例</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