Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. JavaScript
  3. Reference
  4. Standard built-in objects
  5. Math
  6. LN2

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 ⁨July 2015⁩.

TheMath.LN2 static data property represents the natural logarithm of 2, approximately 0.693:

Try it

function getNatLog2() {  return Math.LN2;}console.log(getNatLog2());// Expected output: 0.6931471805599453

Value

𝙼𝚊𝚝𝚑.𝙻𝙽𝟸=ln(2)0.693\mathtt{Math.LN2} = \ln(2) \approx 0.693
Property attributes ofMath.LN2
Writableno
Enumerableno
Configurableno

Description

BecauseLN2 is a static property ofMath, you always use it asMath.LN2, rather than as a property of aMath object you created (Math is not a constructor).

Examples

Using Math.LN2

The following function returns the natural log of 2:

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

Specifications

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

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp