Remarque
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Calcule la tangente hyperbolique inverse.
Syntaxe
double atanh( double x );
float atanhf( float x );
long double atanhl( long double x );
#define atanh(X) // Requires C11 or later
float atanh( float x ); // C++ only
long double atanh( long double x ); // C++ only
Paramètres
x
Valeur à virgule flottante.
Valeur retournée
Les atanh fonctions retournent la tangente hyperbolique inverse (tangente hyperbolique d’arc) de x. Si x la valeur est supérieure à 1, ou inférieure à -1, errno est définie EDOM et le résultat est un NaN silencieux. Si x est égal à 1 ou -1, un infini positif ou négatif est retourné, respectivement, et errno a la valeur ERANGE.
| Input | Exception SEH | Exception _matherr |
|---|---|---|
| ± QNaN, IND | aucun | aucun |
X ≥ 1; x ≤ -1 |
aucun | aucun |
Notes
C++ autorisant la surcharge, vous pouvez appeler des surcharges de atanh qui acceptent et retournent des valeurs float ou long double. Dans un programme C, sauf si vous utilisez la <macro tgmath.h> pour appeler cette fonction, atanh prend toujours et retourne double.
Si vous utilisez la macro <tgmath.h>atanh(), le type de l’argument détermine la version de la fonction sélectionnée. Pour plus d’informations, consultez les mathématiques génériques de type.
Par défaut, l’état global de cette fonction est limité à l’application. Pour modifier ce comportement, consultez État global dans le CRT.
Spécifications
| Fonction | En-tête C | En-tête C++ |
|---|---|---|
atanh, , atanhfatanhl |
<math.h> | <cmath> ou <math.h> |
Macro atanh |
<tgmath.h> |
Pour plus d’informations sur la compatibilité, consultez Compatibility.
Exemple
// 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
Voir aussi
Prise en charge des fonctions mathématiques et à virgule flottante
acosh, , acoshfacoshl
asinh, , asinhfasinhl
cosh, , coshfcoshl
sinh, , sinhfsinhl
tanh, , tanhftanhl