atanhd32(), atanhd64(), atanhd128() - Calculate hyperbolic arctangent

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  atanhd32(_Decimal32 x);
_Decimal64  atanhd64(_Decimal64 x);
_Decimal128 atanhd128(_Decimal128 x);
_Decimal32  atanh(_Decimal32 x);      /* C++ only */  
_Decimal64  atanh(_Decimal64 x);      /* C++ only */
_Decimal128 atanh(_Decimal128 x);     /* C++ only */

General description

The atanh() function returns the hyperbolic arctangent of its argument x.

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 arctangent of its argument x.

If the absolute value of x is greater than 1.0, atanh() sets errno to EDOM and returns NaNQ. If the value of x is equal to 1.0, the function sets errno to ERANGE and returns +HUGE_VAL_D32, +HUGE_VAL_D64 or +HUGE_VAL_D128.

Example

CELEBA16

⁄* CELEBA16

   This example illustrates the atanhd32() function.

*⁄

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

int main(void)
{
   _Decimal32 x, y;

   x = 0.5DF;
   y = atanhd32(x);

   printf("atanhd32(%Hf) = %Hf\n", x, y);
}

Related information