JavaScript 中的 Math.expm1() 函数

htmljavascriptweb developmentfront end technology更新于 2024/8/12 1:53:00

Math 对象的此函数返回 ex – 1 的值,其中 x 和 e 是自然算法的底数和指数。

语法

其语法如下

Math.expm1(6);

示例

<html>
<head>
   <title>JavaScript 示例</title>
</head>
<body>
   <script type="text/javascript">
      var result = Math.expm1(6);
      document.write("结果: "+result);
   </script>
</body>
</html>

输出

结果: 402.4287934927351

相关文章