From cb9e359a51c3249d8f5157db69d43fd413ddeda6 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:45:12 +0100 Subject: unslug ca: move --- .../reference/global_objects/math/atanh/index.html | 127 +++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 files/ca/web/javascript/reference/global_objects/math/atanh/index.html (limited to 'files/ca/web/javascript/reference/global_objects/math/atanh') 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 new file mode 100644 index 0000000000..8a6b7cc2c8 --- /dev/null +++ b/files/ca/web/javascript/reference/global_objects/math/atanh/index.html @@ -0,0 +1,127 @@ +--- +title: Math.atanh() +slug: Web/JavaScript/Referencia/Objectes_globals/Math/atanh +translation_of: Web/JavaScript/Reference/Global_Objects/Math/atanh +--- +
{{JSRef}}
+ +

La funció Math.atanh() retorna l'arctangent hiperbòlica d'un nombre, és a dir

+ +

x(-1,1),Math.atanh(x)=arctanh(x)= l'única ytal quetanh(y)=x\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

+ +

Sintaxi

+ +
Math.atanh(x)
+ +

Paràmetres

+ +
+
x
+
Un nombre.
+
+ +

Descripció

+ +

Com que que atanh() és un mètode estàtic de Math, sempre s'utilitza com a Math.atanh(), en comptes de com a mètode d'una instància de Math (Math no és un constructor).

+ +

Exemples

+ +

Utilitzar Math.atanh()

+ +
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
+
+ +

Es retorna {{jsxref("NaN")}} per a valors més grans que 1 o més petits que -1.

+ +

Polyfill

+ +

Per a |x|<1\left|x\right| < 1, tenim que artanh(x)=12ln(1+x1-x)\operatorname {artanh} (x) = \frac{1}{2}\ln \left( \frac{1 + x}{1 - x} \right) , que podem emular amb la funció següent:

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

Especificacions

+ + + + + + + + + + + + + + +
EspecificacióEstatComentaris
{{SpecName('ES6', '#sec-math.atanh', 'Math.atanh')}}{{Spec2('ES6')}}Definició inicial.
+ +

Compatibilitat amb navegadors

+ +
{{CompatibilityTable}}
+ +
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatChrome("38")}}{{CompatGeckoDesktop("25")}}{{CompatNo}}{{CompatOpera("25")}}{{CompatSafari("7.1")}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatNo}}{{CompatNo}}{{CompatGeckoMobile("25")}}{{CompatNo}}{{CompatNo}}8
+
+ +

Vegeu també

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