cosh, coshf, coshl

Berechnet den hyperbolischen Kosinus.

Syntax

double cosh( double x );
float coshf( float x );
long double coshl( long double x );
#define cosh(X) // Requires C11 or higher

float cosh( float x );  // C++ only
long double cosh( long double x );  // C++ only

Parameter

x
Winkel im Bogenmaß.

Rückgabewert

Der Hyperbelkosinus von x.

Wenn das Ergebnis in einem Aufruf von cosh, coshf oder coshl zu groß ist, gibt die Funktion standardmäßig HUGE_VAL zurück und legt errno auf ERANGE fest.

Eingabe SEH-Ausnahme _matherr-Ausnahme
± QNaN, IND Keine _DOMAIN
x ≥ 7.104760e+002 INEXACT+OVERFLOW OVERFLOW

Hinweise

Da C++ das Überladen zulässt, können Sie Überladungen von cosh aufrufen, die float oder long double-Werte verwenden und zurückgeben. In einem C-Programm, es sei denn, Sie verwenden das <tgmath.h> Makro, um diese Funktion aufzurufen, cosh verwendet immer und gibt eine doublezurück.

Wenn Sie das cosh 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++)
coshf, cosl, coshl <math.h> <cmath> oder <math.h>
coshf-Makro <tgmath.h>

Weitere Informationen zur Kompatibilität finden Sie unter Kompatibilität.

Beispiel

Sehen Sie sich das Beispiel in sinh, sinhf, sinhl.

Siehe auch

Mathematische und Gleitkommaunterstützung
acosh, acoshf, acoshl
asinh, asinhf, asinhl
atanh, atanhf, atanhl
_matherr
sinh, sinhf, sinhl
tanh, tanhf, tanhl