tanh, tanhf, tanhl
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Definiert im Header
<math.h>
|
||
|
float
tanhf
(
float
arg
)
;
|
(1) | (seit C99) |
|
double
tanh
(
double
arg
)
;
|
(2) | |
|
long
double
tanhl
(
long
double
arg
)
;
|
(3) | (seit C99) |
|
Definiert im Header
<tgmath.h>
|
||
|
#define tanh( arg )
|
(4) | (seit C99) |
tanhl
aufgerufen. Andernfalls, wenn das Argument einen Ganzzahltyp oder den Typ
double
hat, wird
tanh
aufgerufen. Andernfalls wird
tanhf
aufgerufen. Wenn das Argument komplex ist, ruft das Makro die entsprechende komplexe Funktion auf (
ctanhf
,
ctanh
,
ctanhl
).
Inhaltsverzeichnis |
Parameter
| arg | - | Fließkommawert, der einen hyperbolischen Winkel darstellt |
Rückgabewert
If no errors occur, the hyperbolic tangent of arg ( tanh(arg) , or|
e
arg
-e -arg |
|
e
arg
+e -arg |
Wenn ein Bereichsfehler aufgrund von Unterlauf auftritt, wird das korrekte Ergebnis (nach Rundung) zurückgegeben.
Fehlerbehandlung
Fehler werden gemeldet, wie in
math_errhandling
festgelegt.
Wenn die Implementierung IEEE-Gleitkommaarithmetik (IEC 60559) unterstützt,
- Wenn das Argument ±0 ist, wird ±0 zurückgegeben.
- Wenn das Argument ±∞ ist, wird ±1 zurückgegeben.
- Wenn das Argument NaN ist, wird NaN zurückgegeben.
Hinweise
POSIX spezifiziert , dass im Fall eines Unterlaufs arg unverändert zurückgegeben wird, und falls dies nicht unterstützt wird, ein implementierungsdefinierter Wert nicht größer als DBL_MIN , FLT_MIN , und LDBL_MIN zurückgegeben wird.
Beispiel
Ausgabe:
tanh(1) = 0.761594 tanh(-1) = -0.761594 tanh(0.1)*sinh(0.2)-cosh(0.2) = -1.000000 tanh(+0) = 0.000000 tanh(-0) = -0.000000
Referenzen
- C23-Standard (ISO/IEC 9899:2024):
-
- 7.12.5.6 Die tanh-Funktionen (S: TBD)
-
- 7.25 Typgenerische Mathematik <tgmath.h> (S: TBD)
-
- F.10.2.6 Die tanh-Funktionen (S: TBD)
- C17-Standard (ISO/IEC 9899:2018):
-
- 7.12.5.6 Die tanh-Funktionen (S.: TBD)
-
- 7.25 Typgenerische Mathematik <tgmath.h> (S.: TBD)
-
- F.10.2.6 Die tanh-Funktionen (S.: TBD)
- C11-Standard (ISO/IEC 9899:2011):
-
- 7.12.5.6 Die tanh-Funktionen (S: 242)
-
- 7.25 Typgenerische Mathematik <tgmath.h> (S: 373-375)
-
- F.10.2.6 Die tanh-Funktionen (S: 520)
- C99-Standard (ISO/IEC 9899:1999):
-
- 7.12.5.6 Die tanh-Funktionen (S. 222-223)
-
- 7.22 Typgenerische Mathematik <tgmath.h> (S. 335-337)
-
- F.9.2.6 Die tanh-Funktionen (S. 457)
- C89/C90 Standard (ISO/IEC 9899:1990):
-
- 4.5.3.3 Die tanh-Funktion
Siehe auch
|
(C99)
(C99)
|
berechnet den hyperbolischen Sinus (
\({\small\sinh{x} }\)
sinh(x)
)
(Funktion) |
|
(C99)
(C99)
|
berechnet den hyperbolischen Kosinus (
\({\small\cosh{x} }\)
cosh(x)
)
(Funktion) |
|
(C99)
(C99)
(C99)
|
berechnet den Areatangens Hyperbolicus (
\({\small\operatorname{artanh}{x} }\)
artanh(x)
)
(Funktion) |
|
(C99)
(C99)
(C99)
|
berechnet den komplexen hyperbolischen Tangens
(Funktion) |
|
C++-Dokumentation
für
tanh
|
|