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

View in English Always 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+eโˆ’x2\mathtt{\operatorname{Math.cosh}(x)} = \cosh(x) = \frac{\mathrm{e}^x + \mathrm{e}^{-x}}{2}

์‹œ๋„ํ•ด ๋ณด๊ธฐ

console.log(Math.cosh(0));
// Expected output: 1

console.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); // Infinity
Math.cosh(-1); // 1.5430806348152437
Math.cosh(-0); // 1
Math.cosh(0); // 1
Math.cosh(1); // 1.5430806348152437
Math.cosh(Infinity); // Infinity

๋ช…์„ธ์„œ

Specification
ECMAScriptยฎ 2026 Language Specification
# sec-math.cosh

๋ธŒ๋ผ์šฐ์ € ํ˜ธํ™˜์„ฑ

๊ฐ™์ด ๋ณด๊ธฐ