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

更新於: 2020-06-25

121 次觀看

開啟你的 職業 生涯

透過完成課程獲取認證

開始學習
廣告
© . All rights reserved.