sinhd32(), sinhd64(), sinhd128() - Calculate hyperbolic sine

Standards

Standards / Extensions C or C++ Dependencies

C/C++ DFP

both z/OS® V1.10

Format

#define __STDC_WANT_DEC_FP__
#include <math.h>

_Decimal32  sinhd32(_Decimal32 x);
_Decimal64  sinhd64(_Decimal64 x);
_Decimal128 sinhd128(_Decimal128 x);
_Decimal32  sinh(_Decimal32 x);     /* C++ only */
_Decimal64  sinh(_Decimal64 x);     /* C++ only */
_Decimal128 sinh(_Decimal128 x);    /* C++ only */

General description

Calculates the hyperbolic sine of x, with x expressed in radians.

These functions work in IEEE decimal floating-point format. See IEEE decimal floating-point for more information.

Note: To use IEEE decimal floating-point, the hardware must have the Decimal Floating-Point Facility installed.

Returned value

If successful, the function returns the hyperbolic sine of x with x expressed in radians.

If the result would overflow, the function returns ±HUGE_VAL_D32, ±HUGE_VAL_D64, or ±HUGE_VAL_D128 according to the value of x, and sets errno to ERANGE. No other errors can occur.

Example

CELEBS75

⁄* CELEBS75

   This example illustrates the sinhd64() function.

*⁄

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

int main(void)
{
   _Decimal64 pi, x, y;

   pi = 3.1415926535DD;
   x = pi⁄2.0DD;
   y = sinhd64(x);

   printf("sinhd64( %Df ) = %Df\n", x, y);
}

Related information