A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Math/tanh below:

Math.tanh() - JavaScript | MDN

Math.tanh()

Baseline Widely available

Die statische Methode Math.tanh() gibt den hyperbolischen Tangens einer Zahl zurück. Das bedeutet,

𝙼𝚊𝚝𝚑.𝚝𝚊𝚗𝚑 ( 𝚡 ) = tanh ( x ) = sinh ( x ) cosh ( x ) = ex − e − x ex + e − x = e 2 x − 1 e 2 x + 1 \mathtt{\operatorname{Math.tanh}(x)}} = \tanh(x) = \frac{\sinh(x)}}{\cosh(x)}} = \frac{\mathrm{e}^x - \mathrm{e}^{-x}}{\mathrm{e}^x + \mathrm{e}^{-x}} = \frac{\mathrm{e}^{2x} - 1}{\mathrm{e}^{2x}+1} Probieren Sie es aus
console.log(Math.tanh(-1));
// Expected output: -0.7615941559557649

console.log(Math.tanh(0));
// Expected output: 0

console.log(Math.tanh(Infinity));
// Expected output: 1

console.log(Math.tanh(1));
// Expected output: 0.7615941559557649
Syntax Parameter Rückgabewert

Der hyperbolische Tangens von x.

Beschreibung

Da tanh() eine statische Methode von Math ist, verwenden Sie diese immer als Math.tanh() und nicht als Methode eines erstellten Math-Objekts (Math ist kein Konstruktor).

Beispiele Verwendung von Math.tanh()
Math.tanh(-Infinity); // -1
Math.tanh(-0); // -0
Math.tanh(0); // 0
Math.tanh(1); // 0.7615941559557649
Math.tanh(Infinity); // 1
Spezifikationen Browser-Kompatibilität Siehe auch MDN-Feedback-Box War diese Übersetzung hilfreich?

Diese Seite wurde automatisch aus dem Englischen übersetzt.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4