atanh, atanhf, atanhl

Berechnet den umgekehrten hyperbolischen Tangens.

Syntax

double atanh( double x );
float atanhf( float x );
long double atanhl( long double x );
#define atanh(X) // Requires C11 or higher

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

Parameter

x
Gleitkommawert.

Rückgabewert

Die atanh Funktionen geben den umgekehrten hyperbolischen Tangens (Arc hyperbolic tangens) von x. Wenn x größer als 1 oder kleiner als -1 ist, wird festgelegtEDOM, errno und das Ergebnis ist ein ruhiger NaN. Wenn x gleich 1 oder –1 ist, wird ein positiver bzw. negativer Unendlichkeitswert ausgegeben, und errno wird auf ERANGE gesetzt.

Eingabe SEH-Ausnahme _matherr-Ausnahme
± QNaN, IND Keine Keine
X ≥ 1; x ≤ -1 Keine Keine

Hinweise

Da C++ das Überladen zulässt, können Sie Überladungen von atanh 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, atanh wird diese Funktion immer verwendet und zurückgegeben double.

Wenn Sie das <Makro tgmath.h>atanh() 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
atanh, atanhf, atanhl <math.h> <cmath> oder <math.h>
atanh-Makro <tgmath.h>

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

Beispiel

// crt_atanh.c
// This program displays the hyperbolic tangent of pi / 4
// and the arc hyperbolic tangent of the result.
//

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

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

   x = tanh( pi / 4 );
   y = atanh( x );
   printf( "tanh( %f ) = %f\n", pi/4, x );
   printf( "atanh( %f ) = %f\n", x, y );
}
tanh( 0.785398 ) = 0.655794
atanh( 0.655794 ) = 0.785398

Siehe auch

Mathematische und Gleitkommaunterstützung
acosh, acoshf, acoshl
asinh, asinhf, asinhl
cosh, coshf, coshl
sinh, sinhf, sinhl
tanh, tanhf, tanhl