--- title: Math.E slug: Web/JavaScript/Reference/Global_Objects/Math/E tags: - JavaScript - Math - Property - Reference translation_of: Web/JavaScript/Reference/Global_Objects/Math/E --- <div>{{JSRef}}</div> <p><strong><code>Math.E</code></strong> プロパティは自然対数の底 (e)、約 2.718 を表します。</p> <p><math display="block"><semantics><mrow><mstyle mathvariant="monospace"><mi>Math.E</mi></mstyle><mo>=</mo><mi>e</mi><mo>≈</mo><mn>2.718</mn></mrow><annotation encoding="TeX">\mathtt{\mi{Math.E}} = e \approx 2.718</annotation></semantics></math></p> <div>{{EmbedInteractiveExample("pages/js/math-e.html")}}</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>E</code> は <code>Math</code> オブジェクトの静的プロパティなので、 <code>Math</code> オブジェクトを生成してプロパティとして使用するのではなく、常に <code>Math.E</code> として使用するようにしてください (<code>Math</code> はコンストラクターではありません)。</p> <h2 id="Examples" name="Examples">例</h2> <h3 id="Using_Math.E" name="Using_Math.E">Math.E の使用</h3> <p>以下の関数は、e を返します。</p> <pre class="brush: js notranslate">function getNapier() { return Math.E; } getNapier(); // 2.718281828459045 </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.e', 'Math.E')}}</td> </tr> </tbody> </table> <h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2> <p>{{Compat("javascript.builtins.Math.E")}}</p> <h2 id="See_also" name="See_also">関連情報</h2> <ul> <li>{{jsxref("Math.exp()")}}</li> <li>{{jsxref("Math.log()")}}</li> <li>{{jsxref("Math.log1p()")}}</li> </ul>