acosh, acoshf, acoshl

Berechnet den umgekehrten hyperbolischen Cosinus.

Syntax

double acosh( double x );
float acoshf( float x );
long double acoshl( long double x );
#define acosh(X) // Requires C11 or higher

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

Parameter

x
Gleitkommawert.

Rückgabewert

Die acosh Funktionen geben den umgekehrten hyperbolischen Kosinus (Arkus hyperbolischen Kosinus) von x. Diese Funktionen sind in der Domäne x ≥ 1 gültig. Wenn x sie kleiner als 1 ist, errno wird dieser wert EDOMfestgelegt, und das Ergebnis ist ein ruhiger NaN. Wenn x ein stiller NaN, ein unbestimmter oder unendlicher Wert ist, wird derselbe Wert zurückgegeben.

Eingabe SEH-Ausnahme _matherr-Ausnahme
± QNaN, IND, INF Keine Keine
x< 1 Keine Keine

Hinweise

Wenn Sie C++ verwenden, können Sie Überladungen von acosh aufrufen, die float oder long double -Werte verwenden und zurückgeben. Wenn Sie in einem C-Programm nicht das <Makro tgmath.h> verwenden, um diese Funktion aufzurufen, acosh wird diese Funktion immer verwendet und zurückgegeben double.

Wenn Sie das <Makro tgmath.h>acosh() 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

Funktion C-Header C++-Header
acosh, acoshf, acoshl <math.h> <cmath>
acosh-Makro <tgmath.h>

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

Beispiel

// crt_acosh.c
// Compile by using: cl /W4 crt_acosh.c
// This program displays the hyperbolic cosine of pi / 4
// and the arc hyperbolic cosine of the result.

#include <math.h>
#include <stdio.h>

int main( void )
{
   double pi = 3.1415926535;
   double x, y;

   x = cosh( pi / 4 );
   y = acosh( x );
   printf( "cosh( %f ) = %f\n", pi/4, x );
   printf( "acosh( %f ) = %f\n", x, y );
}
cosh( 0.785398 ) = 1.324609
acosh( 1.324609 ) = 0.785398

Siehe auch

Mathematische und Gleitkommaunterstützung
asinh, asinhf, asinhl
atanh, atanhf, atanhl
cosh, coshf, coshl
sinh, sinhf, sinhl
tanh, tanhf, tanhl