From a55b575e8089ee6cab7c5c262a7e6db55d0e34d6 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:46:50 +0100 Subject: unslug es: move --- .../reference/global_objects/math/atanh/index.html | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 files/es/web/javascript/reference/global_objects/math/atanh/index.html (limited to 'files/es/web/javascript/reference/global_objects/math/atanh') diff --git a/files/es/web/javascript/reference/global_objects/math/atanh/index.html b/files/es/web/javascript/reference/global_objects/math/atanh/index.html new file mode 100644 index 0000000000..85022b4138 --- /dev/null +++ b/files/es/web/javascript/reference/global_objects/math/atanh/index.html @@ -0,0 +1,87 @@ +--- +title: Math.atanh() +slug: Web/JavaScript/Referencia/Objetos_globales/Math/atanh +translation_of: Web/JavaScript/Reference/Global_Objects/Math/atanh +--- +
{{JSRef}}
+ +

La función Math.atanh() nos retorna un arco hiperbólico de un numero, eso es:

+ +

x(-1,1),Math.atanh(x)=arctanh(x)= the unique ysuch thattanh(y)=x\forall x \in \left( -1, 1 \right), \mathtt{\operatorname{Math.atanh}(x)} = \operatorname{arctanh}(x) = \text{ el unico } \; y \; \text{de tal manera que} \; \tanh(y) = x

+ +
{{EmbedInteractiveExample("pages/js/math-atanh.html")}}
+ + + +

Sintaxis

+ +
Math.atanh(x)
+ +

Parametros

+ +
+
x
+
Un numero.
+
+ +

Retorna un valor

+ +

El arco hiperbolico tangible nos otorga un numero.

+ +

Descripción

+ +

Por que atanh() es un metodo estatico de Math, tu siempre puedes usar eso como Math.atanh(), se puede usar como un metod de Math objeto que tu creaste (Math no es un constructor).

+ +

Polimorfismo

+ +

Para |x|<1\left|x\right| < 1, tenemos artanh(x)=12ln(1+x1-x)\operatorname {artanh} (x) = \frac{1}{2}\ln \left( \frac{1 + x}{1 - x} \right) por lo que esto puede estar emulado con la siguiente función:

+ +
Math.atanh = Math.atanh || function(x) {
+  return Math.log((1+x)/(1-x)) / 2;
+};
+
+ +

Ejemplos

+ +

Using Math.atanh()

+ +
Math.atanh(-2);  // NaN
+Math.atanh(-1);  // -Infinito
+Math.atanh(0);   // 0
+Math.atanh(0.5); // 0.5493061443340548
+Math.atanh(1);   // Infinito
+Math.atanh(2);   // NaN
+
+ +

Para valores mayores a 1 o menores a -1, {{jsxref("NaN")}} retorna.

+ +

Especificaciones

+ + + + + + + + + + + + +
Specification
{{SpecName('ESDraft', '#sec-math.atanh', 'Math.atanh')}}
+ +

Compatibilidad entre navegadores

+ + + +

{{Compat("javascript.builtins.Math.atanh")}}

+ +

Puedes leer

+ + -- cgit v1.2.3-54-g00ecf