blob: 033ee180678785f59c0f00b23308cc0ba5122563 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
---
title: Math.LN10
slug: Web/JavaScript/Reference/Global_Objects/Math/LN10
tags:
- JavaScript
- Math
- Property
- Reference
translation_of: Web/JavaScript/Reference/Global_Objects/Math/LN10
---
<div>{{JSRef}}</div>
<p><strong><code>Math.LN10</code></strong> プロパティは 10 の自然対数、およそ 2.302 を表します。</p>
<p><math display="block"><semantics><mrow><mstyle mathvariant="monospace"><mi>Math.LN10</mi></mstyle><mo>=</mo><mo lspace="0em" rspace="0em">ln</mo><mo stretchy="false">(</mo><mn>10</mn><mo stretchy="false">)</mo><mo>≈</mo><mn>2.302</mn></mrow><annotation encoding="TeX">\mathtt{\mi{Math.LN10}} = \ln(10) \approx 2.302</annotation></semantics></math></p>
<div>{{EmbedInteractiveExample("pages/js/math-ln10.html","shorter")}}</div>
<div class="hidden">このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 <a href="https://github.com/mdn/interactive-examples">https://github.com/mdn/interactive-examples</a> をクローンしてプルリクエストを送信してください。</div>
<div>{{js_property_attributes(0, 0, 0)}}</div>
<h2 id="Description" name="Description">解説</h2>
<p><code>LN10</code> は <code>Math</code> オブジェクトの静的プロパティなので、 <code>Math</code> オブジェクトを生成してプロパティとして使用するのではなく、常に <code>Math.LN10</code> として使用するようにしてください (<code>Math</code> はコンストラクターではありません)。</p>
<h2 id="Examples" name="Examples">例</h2>
<h3 id="Using_Math.LN10" name="Using_Math.LN10">Math.LN10 の使用</h3>
<p>以下の関数は、10 の自然対数を返します。</p>
<pre class="brush:js notranslate">function getNatLog10() {
return Math.LN10;
}
getNatLog10(); // 2.302585092994046
</pre>
<h2 id="Specifications" name="Specifications">仕様書</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">仕様書</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('ESDraft', '#sec-math.ln10', 'Math.LN10')}}</td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div>
<p>{{Compat("javascript.builtins.Math.LN10")}}</p>
<h2 id="See_also" name="See_also">関連情報</h2>
<ul>
<li>{{jsxref("Math.exp()")}}</li>
<li>{{jsxref("Math.log()")}}</li>
<li>{{jsxref("Math.log10()")}}</li>
</ul>
|