Skip to content

Latest commit

 

History

History
92 lines (69 loc) · 2.63 KB

sinh-sinhf-sinhl.md

File metadata and controls

92 lines (69 loc) · 2.63 KB
title ms.date api_name api_location api_type topic_type f1_keywords helpviewer_keywords
sinh, sinhf, sinhl
04/10/2018
sinhl
sinhf
sinhl
msvcrt.dll
msvcr80.dll
msvcr90.dll
msvcr100.dll
msvcr100_clr0400.dll
msvcr110.dll
msvcr110_clr0400.dll
msvcr120.dll
msvcr120_clr0400.dll
ucrtbase.dll
api-ms-win-crt-math-l1-1-0.dll
DLLExport
apiref
sinh
sinhf
sinhl
sinh function
sinhl function
sinhf function
calculating hyperbolic sines
trigonometric functions
sinhf function
sinhl function
hyperbolic functions

sinh, sinhf, sinhl

Calculates the hyperbolic sine.

Syntax

double sinh(double x);
float sinhf(float x);
long double sinhl(long double x);
float sinh(float x);  // C++ only
long double sinh(long double x);  // C++ only

Parameters

x
Angle in radians.

Return Value

The sinh functions return the hyperbolic sine of x. By default, if the result is too large, sinh sets errno to ERANGE and returns ±HUGE_VAL.

Input SEH Exception Matherr Exception
± QNAN,IND None _DOMAIN
|x| ≥ 7.104760e+002 OVERFLOW+INEXACT OVERFLOW

For more information about return codes, see errno, _doserrno, _sys_errlist, and _sys_nerr.

Remarks

Because C++ allows overloading, you can call overloads of sinh that take and return float or long double values. In a C program, sinh always takes and returns double.

Requirements

Routine Required header (C) Required header (C++)
sinh, sinhf, sinhl <math.h> <cmath> or <math.h>

For additional compatibility information, see Compatibility.

Example

// crt_sinhcosh.c
// This program displays the hyperbolic
// sine and hyperbolic cosine of pi / 2.
// Compile by using: cl /W4 crt_sinhcosh.c

#include <math.h>
#include <stdio.h>

int main( void)
{
   double pi = 3.1415926535;
   double x, y;

   x = pi / 2;
   y = sinh( x );
   printf( "sinh( %f ) = %f\n",x, y );
   y = cosh( x );
   printf( "cosh( %f ) = %f\n",x, y );
}
sinh( 1.570796 ) = 2.301299
cosh( 1.570796 ) = 2.509178

See also

Floating-Point Support
acosh, acoshf, acoshl
asinh, asinhf, asinhl
atanh, atanhf, atanhl
cosh, coshf, coshl
tanh, tanhf, tanhl