---
title: Math.LN2
slug: Web/JavaScript/Reference/Global_Objects/Math/LN2
tags:
  - JavaScript
  - Math
  - Property
  - Reference
translation_of: Web/JavaScript/Reference/Global_Objects/Math/LN2
---
<div>{{JSRef}}</div>

<p>A propriedade <strong><code>Math.LN2</code></strong> representa o logaritmo natural (também conhecido como logaritmo neperiano) de 2, que é aproximadamente 0.693:</p>

<p><math display="block"><semantics><mrow><mstyle mathvariant="monospace"><mi>Math.LN2</mi></mstyle><mo>=</mo><mo lspace="0em" rspace="0em">ln</mo><mo stretchy="false">(</mo><mn>2</mn><mo stretchy="false">)</mo><mo>≈</mo><mn>0.693</mn></mrow><annotation encoding="TeX">\mathtt{\mi{Math.LN2}} = \ln(2) \approx 0.693</annotation></semantics></math></p>

<div>{{js_property_attributes(0, 0, 0)}}</div>

<h2 id="Descrição">Descrição</h2>

<p>Por <code>LN2</code> ser uma propriedade estática de <code>Math</code>, deve-se sempre usá-la como <code>Math.LN2</code>, e não como uma propriedade de um objeto <code>Math</code> que você criou.</p>

<h2 id="Exemplos">Exemplos</h2>

<h3 id="Usando_Math.LN2">Usando <code>Math.LN2</code></h3>

<p>A função a seguir retorna o logaritmo natural de 2:</p>

<pre class="brush:js">function getNatLog2() {
  return Math.LN2;
}

getNatLog2(); // 0.6931471805599453
</pre>

<h2 id="Especificações">Especificações</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('ES1')}}</td>
   <td>{{Spec2('ES1')}}</td>
   <td>Initial definition. Implemented in JavaScript 1.0.</td>
  </tr>
  <tr>
   <td>{{SpecName('ES5.1', '#sec-15.8.1.3', 'Math.LN2')}}</td>
   <td>{{Spec2('ES5.1')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('ES6', '#sec-math.ln2', 'Math.LN2')}}</td>
   <td>{{Spec2('ES6')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('ESDraft', '#sec-math.ln2', 'Math.LN2')}}</td>
   <td>{{Spec2('ESDraft')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Compatibilidade com navegadores</h2>

<p>{{Compat("javascript.builtins.Math.LN2")}}</p>

<h2 id="Veja_também">Veja também</h2>

<ul>
 <li>{{jsxref("Math.exp()")}}</li>
 <li>{{jsxref("Math.log()")}}</li>
 <li>{{jsxref("Math.log2()")}}</li>
</ul>