Math.LN10

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.

Math.LN10 は静的データプロパティで、 10 の自然対数、およそ 2.302 を表します。

試してみましょう

function getNatLog10() {
  return Math.LN10;
}

console.log(getNatLog10());
// Expected output: 2.302585092994046

𝙼𝚊𝚝𝚑.𝙻𝙽𝟷𝟶=ln(10)2.302\mathtt{Math.LN10} = \ln(10) \approx 2.302
Math.LN10 のプロパティ属性
書込可能不可
列挙可能不可
設定可能不可

解説

LN10Math オブジェクトの静的プロパティなので、 Math オブジェクトを生成してプロパティとして使用するのではなく、常に Math.LN10 として使用するようにしてください (Math はコンストラクターではありません)。

Math.LN10 の使用

以下の関数は、10 の自然対数を返します。

js
function getNatLog10() {
  return Math.LN10;
}

getNatLog10(); // 2.302585092994046

仕様書

Specification
ECMAScript® 2025 Language Specification
# sec-math.ln10

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
LN10

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報