acosh, acoshf, acoshl, acoshd32, acoshd64, and acoshd128 Subroutines

Purpose

Computes the inverse hyperbolic cosine.

Syntax

#include <math.h>

float acoshf (x)
float x;

long double acoshl (X)
long double x;

double acosh (x)
double x;
_Decimal32 acoshd32 (x)
_Decimal32 x;

_Decimal64 acoshd64 (x)
_Decimal64 x;

_Decimal128 acoshd128 (x)
_Decimal128 x;

Description

The acoshf, acoshl, acoshd32, acoshd64, and acoshd128 subroutines compute the inverse hyperbolic cosine of the x parameter.

The acosh subroutine returns the hyperbolic arc cosine specified by the x parameter, in the range 1 to the +HUGE_VAL value.

An application wishing to check for error situations should set errno to zero and call fetestexcept(FE_ALL_EXCEPT) before calling these subroutines. Upon return, if the errno global variable is nonzero or fetestexcept(FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) is nonzero, an error has occurred.

Parameters

Item Description
x Specifies the value to be computed.

Return Values

Upon successful completion, the acoshf, acoshl, acoshd32, acoshd64, and acoshd128 subroutines return the inverse hyperbolic cosine of the given argument.

For finite values of x < 1, a domain error occurs, and a NaN is returned.

If x is NaN, a NaN is returned.

If x is +1, 0 is returned.

If x is +Inf, +Inf is returned.

If x is -Inf, a domain error occurs, and a NaN is returned.

Error Codes

The acosh subroutine returns NaNQ (not-a-number) and sets errno to EDOM if the x parameter is less than the value of 1.