Freigeben über


atanh, atanhf, atanhl

Berechnet den umgekehrten hyperbolischen Tangens.

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

Parameter

  • x
    Gleitkommawert.

Rückgabewert

Die atanh-Funktionen geben den umgekehrten hyperbolischen Tangens (hyperbolischen Arcustangens) von x zurück. Wenn x größer als 1 oder kleiner als –1 ist, wird errno auf EDOM gesetzt, und das Ergebnis ist ein stilles 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. In einem C-Programm verwendet atanh immer double und gibt diesen Wert zurück.

Anforderungen

Funktion

C-Header

C++-Header

atanh, atanhf, atanhl

<math.h>

<cmath>

Zusätzliche 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 );
}
  

.NET Framework-Entsprechung

Nicht zutreffend. Mit PInvoke rufen Sie die Standard-C-Funktion auf. Weitere Informationen finden Sie unter Beispiele für Plattformaufrufe.

Siehe auch

Referenz

Gleitkommaunterstützung

Long Double

acos, acosf, acosl

asin, asinf, asinl

atan, atanf, atanl, atan2, atan2f, atan2l

cos, cosf, cosl, cosh, coshf, coshl

sin, sinf, sinl, sinh, sinhf, sinhl

tan, tanf, tanl, tanh, tanhf, tanhl

_CItan