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.LN2

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์›”โฉ.

The Math.LN2 property represents the natural logarithm of 2, approximately 0.693:

Math.LN2 ์†์„ฑ์€ 2์˜ ์ž์—ฐ๋กœ๊ทธ ๊ฐ’, ์•ฝ 0.693์˜ ๊ฐ’์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค.

Math.LN2=ln(2)โ‰ˆ0.693\mathtt{\mi{Math.LN2}} = \ln(2) \approx 0.693

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

function getNatLog2() {
  return Math.LN2;
}

console.log(getNatLog2());
// Expected output: 0.6931471805599453
Property attributes of Math.LN2
์“ฐ๊ธฐ ๊ฐ€๋Šฅ๋ถˆ๊ฐ€๋Šฅ
์—ด๊ฑฐ ๊ฐ€๋Šฅ๋ถˆ๊ฐ€๋Šฅ
์„ค์ • ๊ฐ€๋Šฅ๋ถˆ๊ฐ€๋Šฅ

์„ค๋ช…

LN2๋Š” Math์˜ ์ •์  ์†์„ฑ์ด๋ฏ€๋กœ, ์‚ฌ์šฉ์ž๊ฐ€ ์ƒ์„ฑํ•œ Math ๊ฐ์ฒด์˜ ์†์„ฑ์œผ๋กœ ์ ‘๊ทผํ•  ์ˆ˜ ์—†๊ณ  ํ•ญ์ƒ Math.LN2๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. (Math๋Š” ์ƒ์„ฑ์ž๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค)

Examples

Math.LN2 ์‚ฌ์šฉํ•˜๊ธฐ

๋‹ค์Œ ํ•จ์ˆ˜๋Š” 2์˜ ์ž์—ฐ ๋กœ๊ทธ ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.

js
function getNatLog2() {
  return Math.LN2;
}

getNatLog2(); // 0.6931471805599453

๋ช…์„ธ

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

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

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