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
Definido en el encabezado <math.h>
float sinhf ( float arg ) ;
(1) (desde C99)
double sinh ( double arg ) ;
(2)
long double sinhl ( long double arg ) ;
(3) (desde C99)
Definido en el encabezado <tgmath.h>
#define sinh( arg )
(4) (desde C99)
1-3) Calcula el seno hiperbólico de arg .
4) Macro genérico de tipos: Si el argumento tiene tipo long double , sinhl es llamado. De lo contrario, si el argumento tiene tipo entero o el tipo double , sinh es llamado. De lo contrario, sinhf es llamado. Si el argumento es complejo, entonces el macro invoca la función compleja correspondiente ( csinhf , csinh , csinhl ).

Contenidos

Parámetros

arg - valor de punto flotante que representa un ángulo hiperbólico

Valor de retorno

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

Si ocurre un error de rango debido a desbordamiento, ±HUGE_VAL , ±HUGE_VALF , o ±HUGE_VALL es devuelto.

Si ocurre un error de rango debido a desbordamiento inferior, se devuelve el resultado correcto (después del redondeo).

Manejo de errores

Los errores se reportan como se especifica en math_errhandling .

Si la implementación soporta aritmética de punto flotante IEEE (IEC 60559),

  • si el argumento es ±0 o ±∞, se devuelve sin modificaciones,
  • si el argumento es NaN, se devuelve NaN.

Notas

POSIX especifica que en caso de subdesbordamiento, arg se devuelve sin modificar, y si esto no es compatible, se devuelve un valor definido por la implementación no mayor que DBL_MIN , FLT_MIN , y LDBL_MIN .

Ejemplo

#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");
}

Salida posible:

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

Referencias

  • Estándar C23 (ISO/IEC 9899:2024):
  • 7.12.5.5 Las funciones sinh (p: TBD)
  • 7.25 Matemáticas genéricas de tipos <tgmath.h> (p: TBD)
  • F.10.2.5 Las funciones sinh (p: TBD)
  • Estándar C17 (ISO/IEC 9899:2018):
  • 7.12.5.5 Las funciones sinh (p: 176)
  • 7.25 Matemáticas genéricas de tipos <tgmath.h> (p: 272-273)
  • F.10.2.5 Las funciones sinh (p: 379)
  • Estándar C11 (ISO/IEC 9899:2011):
  • 7.12.5.5 Las funciones sinh (p: 241-242)
  • 7.25 Matemáticas genéricas de tipos <tgmath.h> (p: 373-375)
  • F.10.2.5 Las funciones sinh (p: 520)
  • Estándar C99 (ISO/IEC 9899:1999):
  • 7.12.5.5 Las funciones sinh (p: 222)
  • 7.22 Matemáticas genéricas de tipo <tgmath.h> (p: 335-337)
  • F.9.2.5 Las funciones sinh (p: 457)
  • Estándar C89/C90 (ISO/IEC 9899:1990):
  • 4.5.3.2 La función sinh

Véase también

(C99) (C99)
calcula el coseno hiperbólico ( cosh(x) )
(función)
(C99) (C99)
calcula la tangente hiperbólica ( tanh(x) )
(función)
(C99) (C99) (C99)
calcula el seno hiperbólico inverso ( arsinh(x) )
(función)
(C99) (C99) (C99)
calcula el seno hiperbólico complejo
(función)