From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../reference/global_objects/math/acosh/index.html | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 files/pt-br/web/javascript/reference/global_objects/math/acosh/index.html (limited to 'files/pt-br/web/javascript/reference/global_objects/math/acosh') diff --git a/files/pt-br/web/javascript/reference/global_objects/math/acosh/index.html b/files/pt-br/web/javascript/reference/global_objects/math/acosh/index.html new file mode 100644 index 0000000000..d80acedc5d --- /dev/null +++ b/files/pt-br/web/javascript/reference/global_objects/math/acosh/index.html @@ -0,0 +1,100 @@ +--- +title: Math.acosh() +slug: Web/JavaScript/Reference/Global_Objects/Math/acosh +tags: + - JavaScript + - Math + - Method + - Reference + - Referencia + - metodo +translation_of: Web/JavaScript/Reference/Global_Objects/Math/acosh +--- +
{{JSRef}}
+ +

A função Math.acosh() retorna o arco cosseno hiperbólico de um número, onde

+ +

x1,Math.acosh(x)=arcosh(x)= the unique y0such thatcosh(y)=x\forall x \geq 1, \mathtt{\operatorname{Math.acosh}(x)} = \operatorname{arcosh}(x) = \text{ the unique } \; y \geq 0 \; \text{such that} \; \cosh(y) = x

+ +

Sintaxe

+ +
Math.acosh(x)
+ +

Parâmetros

+ +
+
x
+
Um número.
+
+ +

Valor retornado

+ +

The hyperbolic arc-cosine of the given number. If the number is less than 1, {{jsxref("NaN")}}.

+ +

O arco cosseno hiperbólico do número recebido. Se o número for menor que 1, {{jsxref("NaN")}} é retornado.

+ +

Descrição

+ +

Por acosh() ser um método estático de Math, deve-se sempre usá-lo como Math.acosh(), e não como um método de um objeto Math que você criou.

+ +

Exemplos

+ +

Usando Math.acosh()

+ +
Math.acosh(-1);  // NaN
+Math.acosh(0);   // NaN
+Math.acosh(0.5); // NaN
+Math.acosh(1);   // 0
+Math.acosh(2);   // 1.3169578969248166
+
+ +

For values less than 1 Math.acosh() returns {{jsxref("NaN")}}.

+ +

Para valores menores que 1, Math.acosh() retornará {{jsxref("NaN")}}.

+ +

Polyfill

+ +

Para todo x1x \geq 1, temos arcosh(x)=ln(x+x2-1)\operatorname {arcosh} (x) = \ln \left(x + \sqrt{x^{2} - 1} \right). Dessa maneira, este comportamento pode ser emulado da seguinte maneira:

+ +
Math.acosh = Math.acosh || function(x) {
+  return Math.log(x + Math.sqrt(x * x - 1));
+};
+
+ +

Especificações

+ + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('ES6', '#sec-math.acosh', 'Math.acosh')}}{{Spec2('ES6')}}Definição inicial.
{{SpecName('ESDraft', '#sec-math.acosh', 'Math.acosh')}}{{Spec2('ESDraft')}} 
+ +

Compatibilidade nos navegadores

+ + + +

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

+ +

See also

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