atanh, atanhf, atanhl
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Défini dans l'en-tête
<math.h>
|
||
|
float
atanhf
(
float
arg
)
;
|
(1) | (depuis C99) |
|
double
atanh
(
double
arg
)
;
|
(2) | (depuis C99) |
|
long
double
atanhl
(
long
double
arg
)
;
|
(3) | (depuis C99) |
|
Défini dans l'en-tête
<tgmath.h>
|
||
|
#define atanh( arg )
|
(4) | (depuis C99) |
atanhl
est appelé. Sinon, si l'argument a un type entier ou le type
double
,
atanh
est appelé. Sinon,
atanhf
est appelé. Si l'argument est complexe, alors la macro appelle la fonction complexe correspondante (
catanhf
,
catanh
,
catanhl
).
Table des matières |
Paramètres
| arg | - | valeur à virgule flottante représentant l'aire d'un secteur hyperbolique |
Valeur de retour
Si aucune erreur ne se produit, la tangente hyperbolique inverse de
arg
(
tanh
-1
(arg)
, ou
artanh(arg)
), est retournée.
Si une erreur de domaine se produit, une valeur définie par l'implémentation est retournée (NaN là où supporté).
Si une erreur de pôle se produit,
±
HUGE_VAL
,
±HUGE_VALF
, ou
±HUGE_VALL
est retourné (avec le signe correct).
Si une erreur de plage se produit en raison d'un dépassement inférieur, le résultat correct (après arrondi) est retourné.
Gestion des erreurs
Les erreurs sont signalées comme spécifié dans
math_errhandling
.
Si l'argument n'est pas sur l'intervalle
[
-
1
,
+
1
]
, une erreur de plage se produit.
Si l'argument est ±1, une erreur de pôle se produit.
Si l'implémentation prend en charge l'arithmétique à virgule flottante IEEE (IEC 60559),
- Si l'argument est ±0, il est retourné inchangé.
- Si l'argument est ±1, ±∞ est retourné et FE_DIVBYZERO est déclenché.
- Si |arg|>1 , NaN est retourné et FE_INVALID est déclenché.
- Si l'argument est NaN, NaN est retourné.
Notes
Bien que la norme C nomme cette fonction « tangente hyperbolique inverse », les fonctions inverses des fonctions hyperboliques sont les fonctions d'aire. Leur argument est l'aire d'un secteur hyperbolique, et non un arc. Le nom correct est « tangente hyperbolique inverse » (utilisé par POSIX) ou « tangente hyperbolique d'aire ».
POSIX spécifie qu'en cas de dépassement inférieur, arg est retourné non modifié, et si cela n'est pas pris en charge, une valeur définie par l'implémentation non supérieure à DBL_MIN , FLT_MIN , et LDBL_MIN est retournée.
Exemple
#include <errno.h> #include <fenv.h> #include <float.h> #include <math.h> #include <stdio.h> // #pragma STDC FENV_ACCESS ON int main(void) { printf("atanh(0) = %f\natanh(-0) = %f\n", atanh(0), atanh(-0.0)); printf("atanh(0.9) = %f\n", atanh(0.9)); // error handling errno = 0; feclearexcept(FE_ALL_EXCEPT); printf("atanh(-1) = %f\n", atanh(-1)); if (errno == ERANGE) perror(" errno == ERANGE"); if (fetestexcept(FE_DIVBYZERO)) puts(" FE_DIVBYZERO raised"); }
Sortie possible :
atanh(0) = 0.000000
atanh(-0) = -0.000000
atanh(0.9) = 1.472219
atanh(-1) = -inf
errno == ERANGE: Résultat numérique hors limites
FE_DIVBYZERO raised
Références
- Norme C23 (ISO/CEI 9899:2024) :
-
- 7.12.5.3 Les fonctions atanh (p: 241)
-
- 7.25 Mathématiques génériques <tgmath.h> (p: 373-375)
-
- F.10.2.3 Les fonctions atanh (p: 520)
- Norme C17 (ISO/CEI 9899:2018) :
-
- 7.12.5.3 Les fonctions atanh (p: TBD)
-
- 7.25 Mathématiques génériques <tgmath.h> (p: TBD)
-
- F.10.2.3 Les fonctions atanh (p: TBD)
- Norme C11 (ISO/CEI 9899:2011) :
-
- 7.12.5.3 Les fonctions atanh (p: 241)
-
- 7.25 Mathématiques génériques de type <tgmath.h> (p: 373-375)
-
- F.10.2.3 Les fonctions atanh (p: 520)
- Norme C99 (ISO/CEI 9899:1999) :
-
- 7.12.5.3 Les fonctions atanh (p : 221-222)
-
- 7.22 Mathématiques génériques de type <tgmath.h> (p : 335-337)
-
- F.9.2.3 Les fonctions atanh (p : 457)
Voir aussi
|
(C99)
(C99)
(C99)
|
calcule le sinus hyperbolique inverse (
\({\small\operatorname{arsinh}{x} }\)
arsinh(x)
)
(fonction) |
|
(C99)
(C99)
(C99)
|
calcule le cosinus hyperbolique inverse (
\({\small\operatorname{arcosh}{x} }\)
arcosh(x)
)
(fonction) |
|
(C99)
(C99)
|
calcule la tangente hyperbolique (
\({\small\tanh{x} }\)
tanh(x)
)
(fonction) |
|
(C99)
(C99)
(C99)
|
calcule l'arc tangente hyperbolique complexe
(fonction) |
|
Documentation C++
pour
atanh
|
|
Liens externes
| Weisstein, Eric W. "Tangente Hyperbolique Inverse." De MathWorld — Une ressource web Wolfram. |