Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / C

sinh — hyperbolic sine

The sinh function from <math.h> computes the hyperbolic sine of a double argument and returns a double.

Version: C23; repository compiler flag, production runtime not attested

Syntax

#include <math.h>
double sinh(double x);

sinh(x) computes hyperbolic sine, not ordinary sine sin(x). Its declaration is provided by <math.h>; both argument and result have type double.

A range error occurs when a finite argument has excessive magnitude. A range error may occur when a nonzero argument is too close to zero. Do not assume every result is representable.

On implementations conforming to Annex F, sinh preserves the sign of zero and infinity. The example uses 0.0 and prints one fractional digit.

Examples

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

int main(void)
{
    double result = sinh(0.0);
    printf("sinh(0.0) = %.1f\n", result);
    return 0;
}

Result

sinh(0.0) = 0.0

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources