diff options
Diffstat (limited to 'files/ca/web/javascript/reference/global_objects/math/atanh/index.html')
-rw-r--r-- | files/ca/web/javascript/reference/global_objects/math/atanh/index.html | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/files/ca/web/javascript/reference/global_objects/math/atanh/index.html b/files/ca/web/javascript/reference/global_objects/math/atanh/index.html deleted file mode 100644 index 2b492dbdcc..0000000000 --- a/files/ca/web/javascript/reference/global_objects/math/atanh/index.html +++ /dev/null @@ -1,128 +0,0 @@ ---- -title: Math.atanh() -slug: Web/JavaScript/Reference/Global_Objects/Math/atanh -translation_of: Web/JavaScript/Reference/Global_Objects/Math/atanh -original_slug: Web/JavaScript/Referencia/Objectes_globals/Math/atanh ---- -<div>{{JSRef}}</div> - -<p>La funció <strong><code>Math.atanh()</code></strong> retorna l'arctangent hiperbòlica d'un nombre, és a dir</p> - -<p><math display="block"><semantics><mrow><mo>∀</mo><mi>x</mi><mo>∊</mo><mrow><mo>(</mo><mrow><mo>-</mo><mn>1</mn><mo>,</mo><mn>1</mn></mrow><mo>)</mo></mrow><mo>,</mo><mstyle mathvariant="monospace"><mrow><mo lspace="0em" rspace="thinmathspace">Math.atanh</mo><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo></mrow></mstyle><mo>=</mo><mo lspace="0em" rspace="thinmathspace">arctanh</mo><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><mtext> l'única </mtext><mspace width="thickmathspace"></mspace><mi>y</mi><mspace width="thickmathspace"></mspace><mtext>tal que</mtext><mspace width="thickmathspace"></mspace><mo lspace="0em" rspace="0em">tanh</mo><mo stretchy="false">(</mo><mi>y</mi><mo stretchy="false">)</mo><mo>=</mo><mi>x</mi></mrow><annotation encoding="TeX">\forall x \in \left( -1, 1 \right), \mathtt{\operatorname{Math.atanh}(x)} = \operatorname{arctanh}(x) = \text{ the unique } \; y \; \text{such that} \; \tanh(y) = x</annotation></semantics></math></p> - -<h2 id="Sintaxi">Sintaxi</h2> - -<pre class="syntaxbox"><code>Math.atanh(<var>x</var>)</code></pre> - -<h3 id="Paràmetres">Paràmetres</h3> - -<dl> - <dt><code>x</code></dt> - <dd>Un nombre.</dd> -</dl> - -<h2 id="Descripció">Descripció</h2> - -<p>Com que que <code>atanh</code>() és un mètode estàtic de Math, sempre s'utilitza com a <code>Math.atanh</code>(), en comptes de com a mètode d'una instància de <code>Math </code>(<code>Math </code>no és un constructor).</p> - -<h2 id="Exemples">Exemples</h2> - -<h3 id="Utilitzar_Math.atanh()">Utilitzar <code>Math.atanh()</code></h3> - -<pre class="brush: js">Math.atanh(-2); // NaN -Math.atanh(-1); // -Infinity -Math.atanh(0); // 0 -Math.atanh(0.5); // 0.5493061443340548 -Math.atanh(1); // Infinity -Math.atanh(2); // NaN -</pre> - -<p>Es retorna {{jsxref("NaN")}} per a valors més grans que 1 o més petits que -1.</p> - -<h2 id="Polyfill">Polyfill</h2> - -<p>Per a <math><semantics><mrow><mrow><mo>|</mo><mi>x</mi><mo>|</mo></mrow><mo><</mo><mn>1</mn></mrow><annotation encoding="TeX">\left|x\right| < 1</annotation></semantics></math>, tenim que <math><semantics><mrow><mo lspace="0em" rspace="thinmathspace">artanh</mo><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><mfrac><mn>1</mn><mn>2</mn></mfrac><mo lspace="0em" rspace="0em">ln</mo><mrow><mo>(</mo><mfrac><mrow><mn>1</mn><mo>+</mo><mi>x</mi></mrow><mrow><mn>1</mn><mo>-</mo><mi>x</mi></mrow></mfrac><mo>)</mo></mrow></mrow><annotation encoding="TeX">\operatorname {artanh} (x) = \frac{1}{2}\ln \left( \frac{1 + x}{1 - x} \right)</annotation></semantics></math> , que podem emular amb la funció següent:</p> - -<pre class="brush: js">Math.atanh = Math.atanh || function(x) { - return Math.log((1+x)/(1-x)) / 2; -}; -</pre> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentaris</th> - </tr> - <tr> - <td>{{SpecName('ES6', '#sec-math.atanh', 'Math.atanh')}}</td> - <td>{{Spec2('ES6')}}</td> - <td>Definició inicial.</td> - </tr> - </tbody> -</table> - -<h2 id="Compatibilitat_amb_navegadors">Compatibilitat amb navegadors</h2> - -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatChrome("38")}}</td> - <td>{{CompatGeckoDesktop("25")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatOpera("25")}}</td> - <td>{{CompatSafari("7.1")}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatGeckoMobile("25")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>8</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Vegeu_també">Vegeu també</h2> - -<ul> - <li>{{jsxref("Math.acosh()")}} {{experimental_inline}}</li> - <li>{{jsxref("Math.asinh()")}} {{experimental_inline}}</li> - <li>{{jsxref("Math.cosh()")}} {{experimental_inline}}</li> - <li>{{jsxref("Math.sinh()")}} {{experimental_inline}}</li> - <li>{{jsxref("Math.tanh()")}} {{experimental_inline}}</li> -</ul> |