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/sinh/index.html | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 files/pt-br/web/javascript/reference/global_objects/math/sinh/index.html (limited to 'files/pt-br/web/javascript/reference/global_objects/math/sinh/index.html') diff --git a/files/pt-br/web/javascript/reference/global_objects/math/sinh/index.html b/files/pt-br/web/javascript/reference/global_objects/math/sinh/index.html new file mode 100644 index 0000000000..68f6aeb977 --- /dev/null +++ b/files/pt-br/web/javascript/reference/global_objects/math/sinh/index.html @@ -0,0 +1,96 @@ +--- +title: Math.sinh() +slug: Web/JavaScript/Reference/Global_Objects/Math/sinh +translation_of: Web/JavaScript/Reference/Global_Objects/Math/sinh +--- +
{{JSRef}}
+ +

A função Math.sinh() retorna o seno hiperbólico de um número, que pode ser expresso usando a {{jsxref("Math.E", "constante e", "", 1)}}:

+ +

Math.sinh(x)=ex-e-x2\mathtt{\operatorname{Math.sinh(x)}} = \frac{e^x - e^{-x}}{2}

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

Sintáxe

+ +
Math.sinh(x)
+ +

Parâmetros

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

Valor retornado

+ +

O seno hiperbólico do número dado.

+ +

Descrição

+ +

Como sinh() é um método estático de Math, você sempre deve usar como Math.sinh(), ao invés de um novo objeto instanciado Math (Math não é um construtor).

+ +

Exemplos

+ +

Usando Math.sinh()

+ +
Math.sinh(0); // 0
+Math.sinh(1); // 1.1752011936438014
+
+ +

Polyfill

+ +

Isso pode ser emulado com a ajuda da função {{jsxref("Math.exp()")}}:

+ +
Math.sinh = Math.sinh || function(x) {
+  return (Math.exp(x) - Math.exp(-x)) / 2;
+}
+
+ +

ou usando apenas uma chamada para a função {{jsxref("Math.exp()")}}:

+ +
Math.sinh = Math.sinh || function(x) {
+  var y = Math.exp(x);
+  return (y - 1 / y) / 2;
+}
+
+ +

Especificações

+ + + + + + + + + + + + + + + + + + + +
EspecificaçãoStatusComentário
{{SpecName('ES2015', '#sec-math.sinh', 'Math.sinh')}}{{Spec2('ES2015')}}Definição inicial.
{{SpecName('ESDraft', '#sec-math.sinh', 'Math.sinh')}}{{Spec2('ESDraft')}} 
+ +

Compatibilidade nos navegadores

+ + + +

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

+ +

Veja também

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