javascript 中的 Math.asinh() 和 Math.acosh() 函式有何用途?


Math.asinh() Math.acosh() 函式分別用於計算某個數的雙曲反正弦雙曲反正切值。這些函式是 Math靜態方法,因此它們總是被用作 Math.asinh() Math.acosh(), 而不是作為建立的數學物件的函式。

Math.asinh()

該方法用於計算某個數的雙曲反正弦值。它將一個數作為引數,並返回雙曲正弦值

示例

即時演示

<html>
<body>
<script>
   document.write(Math.asinh(2));
   document.write("</br>");
   document.write(Math.asinh(7));
</script>
</body>
</html>

輸出

1.4436354751788103
2.644120761058629


Math.acosh()

該方法用於計算某個數的雙曲反正切值。它將一個數作為引數,並返回雙曲正切值

示例

即時演示

<html>
<body>
<script>
   document.write(Math.acosh(2));
   document.write("</br>");
   document.write(Math.acosh(7));
</script>
</body>
</html>

輸出

1.3169578969248166
2.6339157938496336

更新於: 31-Jul-2019

108 次瀏覽

開始你的職業生涯

透過完成課程獲得認證

開始
廣告