Namespaces
Variants

sinh, sinhf, sinhl

From cppreference.net
< c ‎ | numeric ‎ | math
Common mathematical functions
Functions
Basic operations
(C99)
(C99)
(C99)
(C99) (C99) (C99) (C23)
Maximum/minimum operations
Exponential functions
Power functions
Trigonometric and hyperbolic functions
Nearest integer floating-point
(C99) (C99) (C99)
(C23) (C23) (C23) (C23)
Floating-point manipulation
Narrowing operations
(C23)
(C23)
(C23)
(C23)
(C23)
(C23)
Quantum and quantum exponent
Decimal re-encoding functions
Total order and payload functions
Classification
Error and gamma functions
(C99)
(C99)
(C99)
(C99)
Types
Macro constants
Special floating-point values
Arguments and return values
Error handling
Fast operation indicators
Défini dans l'en-tête <math.h>
float sinhf ( float arg ) ;
(1) (depuis C99)
double sinh ( double arg ) ;
(2)
long double sinhl ( long double arg ) ;
(3) (depuis C99)
Défini dans l'en-tête <tgmath.h>
#define sinh( arg )
(4) (depuis C99)
1-3) Calcule le sinus hyperbolique de arg .
4) Macro générique de type : Si l'argument a le type long double , sinhl est appelé. Sinon, si l'argument a un type entier ou le type double , sinh est appelé. Sinon, sinhf est appelé. Si l'argument est complexe, alors la macro appelle la fonction complexe correspondante ( csinhf , csinh , csinhl ).

Table des matières

Paramètres

arg - valeur en virgule flottante représentant un angle hyperbolique

Valeur de retour

If no errors occur, the hyperbolic sine of arg ( sinh(arg) , or
e arg
-e -arg
2
) is returned.

Si une erreur de plage due à un dépassement de capacité se produit, ±HUGE_VAL , ±HUGE_VALF , ou ±HUGE_VALL est renvoyé.

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'implémentation prend en charge l'arithmétique à virgule flottante IEEE (IEC 60559),

  • si l'argument est ±0 ou ±∞, il est retourné inchangé,
  • si l'argument est NaN, NaN est retourné.

Notes

POSIX spécifie qu'en cas de dépassement inférieur, arg est retourné inchangé, 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 <math.h>
#include <stdio.h>
// #pragma STDC FENV_ACCESS ON
int main(void)
{
    printf("sinh(1) = %f\nsinh(-1)=%f\n", sinh(1), sinh(-1));
    printf("log(sinh(1) + cosh(1))=%f\n", log(sinh(1) + cosh(1)));
    // special values
    printf("sinh(+0) = %f\nsinh(-0)=%f\n", sinh(0.0), sinh(-0.0));
    // error handling
    errno = 0; feclearexcept(FE_ALL_EXCEPT);
    printf("sinh(710.5) = %f\n", sinh(710.5));
    if (errno == ERANGE)
        perror("    errno == ERANGE");
    if (fetestexcept(FE_OVERFLOW))
        puts("    FE_OVERFLOW raised");
}

Sortie possible :

sinh(1) = 1.175201
sinh(-1)=-1.175201
log(sinh(1) + cosh(1))=1.000000
sinh(+0) = 0.000000
sinh(-0)=-0.000000
sinh(710.5) = inf
    errno == ERANGE: Numerical result out of range
    FE_OVERFLOW raised

Références

  • Norme C23 (ISO/CEI 9899:2024) :
  • 7.12.5.5 Les fonctions sinh (p: TBD)
  • 7.25 Mathématiques génériques de type <tgmath.h> (p: TBD)
  • F.10.2.5 Les fonctions sinh (p: TBD)
  • Norme C17 (ISO/CEI 9899:2018) :
  • 7.12.5.5 Les fonctions sinh (p : 176)
  • 7.25 Mathématiques génériques de type <tgmath.h> (p : 272-273)
  • F.10.2.5 Les fonctions sinh (p : 379)
  • Norme C11 (ISO/CEI 9899:2011) :
  • 7.12.5.5 Les fonctions sinh (p: 241-242)
  • 7.25 Mathématiques génériques de type <tgmath.h> (p: 373-375)
  • F.10.2.5 Les fonctions sinh (p: 520)
  • Norme C99 (ISO/CEI 9899:1999) :
  • 7.12.5.5 Les fonctions sinh (p. 222)
  • 7.22 Mathématiques génériques de type <tgmath.h> (p. 335-337)
  • F.9.2.5 Les fonctions sinh (p. 457)
  • Norme C89/C90 (ISO/IEC 9899:1990) :
  • 4.5.3.2 La fonction sinh

Voir aussi

(C99) (C99)
calcule le cosinus hyperbolique ( cosh(x) )
(fonction)
(C99) (C99)
calcule la tangente hyperbolique ( tanh(x) )
(fonction)
(C99) (C99) (C99)
calcule le sinus hyperbolique inverse ( arsinh(x) )
(fonction)
(C99) (C99) (C99)
calcule le sinus hyperbolique complexe
(fonction)