diff options
| author | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:46:50 +0100 |
|---|---|---|
| committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:46:50 +0100 |
| commit | a55b575e8089ee6cab7c5c262a7e6db55d0e34d6 (patch) | |
| tree | 5032e6779a402a863654c9d65965073f09ea4182 /files/es/web/javascript/referencia/objetos_globales/math/tanh/index.html | |
| parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
| download | translated-content-a55b575e8089ee6cab7c5c262a7e6db55d0e34d6.tar.gz translated-content-a55b575e8089ee6cab7c5c262a7e6db55d0e34d6.tar.bz2 translated-content-a55b575e8089ee6cab7c5c262a7e6db55d0e34d6.zip | |
unslug es: move
Diffstat (limited to 'files/es/web/javascript/referencia/objetos_globales/math/tanh/index.html')
| -rw-r--r-- | files/es/web/javascript/referencia/objetos_globales/math/tanh/index.html | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/files/es/web/javascript/referencia/objetos_globales/math/tanh/index.html b/files/es/web/javascript/referencia/objetos_globales/math/tanh/index.html deleted file mode 100644 index 138c466b37..0000000000 --- a/files/es/web/javascript/referencia/objetos_globales/math/tanh/index.html +++ /dev/null @@ -1,95 +0,0 @@ ---- -title: Math.tanh() -slug: Web/JavaScript/Referencia/Objetos_globales/Math/tanh -tags: - - ECMAScript 2015 - - JavaScript - - Referencia - - metodo -translation_of: Web/JavaScript/Reference/Global_Objects/Math/tanh ---- -<div>{{JSRef}}</div> - -<p>La funcion <strong><code>Math.tanh()</code></strong> devuelve la hyperbolica tangente de un numero, esto es </p> - -<p><math display="block"><semantics><mrow><mo lspace="0em" rspace="0em">tanh</mo><mi>x</mi><mo>=</mo><mfrac><mrow><mo lspace="0em" rspace="0em">sinh</mo><mi>x</mi></mrow><mrow><mo lspace="0em" rspace="0em">cosh</mo><mi>x</mi></mrow></mfrac><mo>=</mo><mfrac><mrow><msup><mi>e</mi><mi>x</mi></msup><mo>-</mo><msup><mi>e</mi><mrow><mo>-</mo><mi>x</mi></mrow></msup></mrow><mrow><msup><mi>e</mi><mi>x</mi></msup><mo>+</mo><msup><mi>e</mi><mrow><mo>-</mo><mi>x</mi></mrow></msup></mrow></mfrac><mo>=</mo><mfrac><mrow><msup><mi>e</mi><mrow><mn>2</mn><mi>x</mi></mrow></msup><mo>-</mo><mn>1</mn></mrow><mrow><msup><mi>e</mi><mrow><mn>2</mn><mi>x</mi></mrow></msup><mo>+</mo><mn>1</mn></mrow></mfrac></mrow><annotation encoding="TeX">\tanh x = \frac{\sinh x}{\cosh x} = \frac {e^x - e^{-x}} {e^x + e^{-x}} = \frac{e^{2x} - 1}{e^{2x}+1}</annotation></semantics></math></p> - -<div>{{EmbedInteractiveExample("pages/js/math-tanh.html")}}</div> - -<h2 id="Sintaxis">Sintaxis</h2> - -<pre class="syntaxbox"><code>Math.tanh(<var>x</var>)</code></pre> - -<h3 id="Parametros">Parametros</h3> - -<dl> - <dt><code>x</code></dt> - <dd>Un numero.</dd> -</dl> - -<h3 id="Devolver_valor">Devolver valor</h3> - -<p>La hyperbolica tangente del numero obtenido.</p> - -<h2 id="Descripcion">Descripcion</h2> - -<p>Porque <code>tanh()</code> es un metodo estatico de <code>Math</code>, siempre se usa como <code>Math.tanh()</code>, en lugar de ser un metodo de <code>Math</code> objeto que creas (<code>Math</code> no es un constructor).</p> - -<h2 id="Ejemplos">Ejemplos</h2> - -<h3 id="Usando_Math.tanh()">Usando <code>Math.tanh()</code></h3> - -<pre class="brush: js">Math.tanh(0); // 0 -Math.tanh(Infinity); // 1 -Math.tanh(1); // 0.7615941559557649 -</pre> - -<h2 id="Polyfill">Polyfill</h2> - -<p>Esto puede ser emulado con ayuda de {{jsxref("Math.exp()")}} funcion:</p> - -<pre class="brush: js">Math.tanh = Math.tanh || function(x){ - var a = Math.exp(+x), b = Math.exp(-x); - return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (a + b); -} -</pre> - -<h2 id="Especificaciones">Especificaciones</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificacion</th> - <th scope="col">Estado</th> - <th scope="col">Comentario</th> - </tr> - <tr> - <td>{{SpecName('ES2015', '#sec-math.tanh', 'Math.tanh')}}</td> - <td>{{Spec2('ES2015')}}</td> - <td> - <p>Definicion inicial.</p> - </td> - </tr> - <tr> - <td>{{SpecName('ESDraft', '#sec-math.tanh', 'Math.tanh')}}</td> - <td>{{Spec2('ESDraft')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilidad_con_navegadores">Compatibilidad con navegadores</h2> - -<p class="hidden">La compatibilidad de la tabla en esta pagina esta generada desde una structura data. Si quiers contribuir a la data, visita <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> y envianos un propuesta.</p> - -<p>{{Compat("javascript.builtins.Math.tanh")}}</p> - -<h2 id="sect1"> </h2> - -<ul> - <li>{{jsxref("Math.acosh()")}}</li> - <li>{{jsxref("Math.asinh()")}}</li> - <li>{{jsxref("Math.atanh()")}}</li> - <li>{{jsxref("Math.cosh()")}}</li> - <li>{{jsxref("Math.sinh()")}}</li> -</ul> |
