acoshd32(), acoshd64(), acoshd128() - Calculate hyperbolic arccosine

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  acoshd32(_Decimal32 x);
_Decimal64  acoshd64(_Decimal64 x);
_Decimal128 acoshd128(_Decimal128 x);
_Decimal32  acosh(_Decimal32 x);      /* C++ only */
_Decimal64  acosh(_Decimal64 x);      /* C++ only */
_Decimal128 acosh(_Decimal128 x);     /* C++ only */

General description

The acosh functions compute the (nonnegative) arc hyperbolic cosine of x. A domain error occurs for arguments less than 1.

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

If x is less than 1.0, the function sets errno to EDOM and returns NaNQ.

Example

CELEBA12

/* CELEBA12

   This example illustrates the acoshd64() function.

*/

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

int main(void)
{
   _Decimal64 x, y;

   x = 100.0DD;
   y = acoshd64(x);

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

Related information