sinh
, sinhf
, sinhl
Berechnet den hyperbolischen Sinus.
Syntax
double sinh(double x);
float sinhf(float x);
long double sinhl(long double x);
#define sinh(x) // Requires C11 or higher
float sinh(float x); // C++ only
long double sinh(long double x); // C++ only
Parameter
x
Winkel im Bogenmaß.
Rückgabewert
Die sinh
-Funktionen geben den hyperbolischen Sinus von x
zurück. Wenn das Ergebnis standardmäßig zu groß ist, sinh
wird ±HUGE_VAL
festgelegt errno
ERANGE
und zurückgegeben.
Eingabe | SEH-Ausnahme | _matherr -Ausnahme |
---|---|---|
± QNaN, IND | None | _DOMAIN |
|x| ≥ 7.104760e+002 |
OVERFLOW +INEXACT |
OVERFLOW |
Weitere Informationen zu Rückgabecodes finden Sie unter , , _doserrno
, _sys_errlist
und _sys_nerr
.errno
Hinweise
Da C++ das Überladen zulässt, können Sie Überladungen von sinh
aufrufen, die float
oder long double
-Werte verwenden und zurückgeben. In einem C-Programm wird diese Funktion immer verwendet und zurückgegebendouble
, sinh
es sei denn, Sie verwenden das <tgmath.h>
Makro, um diese Funktion aufzurufen.
Wenn Sie das sinh
Makro <tgmath.h>
verwenden, bestimmt der Typ des Arguments, welche Version der Funktion ausgewählt ist. Ausführliche Informationen finden Sie unter "Typgenerika" .
Standardmäßig gilt der globale Zustand dieser Funktion für die Anwendung. Informationen zum Ändern dieses Verhaltens finden Sie im Global state in the CRT.
Anforderungen
Routine | Erforderlicher Header (C) | Erforderlicher Header (C++) |
---|---|---|
sinh , sinhf , sinhl |
<math.h> |
<cmath> oder <math.h> |
sinh -Makro |
<tgmath.h> |
Weitere Informationen zur Kompatibilität finden Sie unter Kompatibilität.
Beispiel
// crt_sinhcosh.c
// This program displays the hyperbolic
// sine and hyperbolic cosine of pi / 2.
// Compile by using: cl /W4 crt_sinhcosh.c
#include <math.h>
#include <stdio.h>
int main( void)
{
double pi = 3.1415926535;
double x, y;
x = pi / 2;
y = sinh( x );
printf( "sinh( %f ) = %f\n",x, y );
y = cosh( x );
printf( "cosh( %f ) = %f\n",x, y );
}
sinh( 1.570796 ) = 2.301299
cosh( 1.570796 ) = 2.509178
Siehe auch
Mathematische und Gleitkommaunterstützung
acosh
, acoshf
, acoshl
asinh
, asinhf
, asinhl
atanh
, atanhf
, atanhl
cosh
, coshf
, coshl
tanh
, tanhf
, tanhl
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für