Movatterモバイル変換


[0]ホーム

URL:


  1. 개발자를 위한 웹 기술
  2. JavaScript
  3. JavaScript 참고서
  4. 표준 내장 객체
  5. Math
  6. Math.cosh()

This page was translated from English by the community.Learn more and join the MDN Web Docs community.

View in EnglishAlways switch to English

Math.cosh()

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2015년 7월⁩.

Math.cosh() 정적 메서드는 숫자의 쌍곡 코사인을 반환합니다. 이는 아래와 같습니다.

𝙼𝚊𝚝𝚑.𝚌𝚘𝚜𝚑(𝚡)=cosh(x)=ex+ex2\mathtt{\operatorname{Math.cosh}(x)} = \cosh(x) = \frac{\mathrm{e}^x + \mathrm{e}^{-x}}{2}

시도해 보기

console.log(Math.cosh(0));// Expected output: 1console.log(Math.cosh(1));// Expected output: 1.543080634815244 (approximately)console.log(Math.cosh(-1));// Expected output: 1.543080634815244 (approximately)console.log(Math.cosh(2));// Expected output: 3.7621956910836314

구문

js
Math.cosh(x)

매개 변수

x

숫자.

반환 값

x의 쌍곡 코사인.

설명

Math의 정적 메서드이기 때문에cosh()는 생성한Math 객체(Math는 생성자가 아닙니다)의 메서드를 사용하기보다는 언제나Math.cosh()를 사용하세요.

예제

Math.cosh() 사용하기

js
Math.cosh(-Infinity); // InfinityMath.cosh(-1); // 1.5430806348152437Math.cosh(-0); // 1Math.cosh(0); // 1Math.cosh(1); // 1.5430806348152437Math.cosh(Infinity); // Infinity

명세서

Specification
ECMAScript® 2026 Language Specification
# sec-math.cosh

브라우저 호환성

같이 보기

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp