acosh, acoshf, acoshl
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at acosh, acoshf, acoshl.
Calculates the inverse hyperbolic cosine.
Syntax
double acosh(
double x
);
float acosh(
float x
); // C++ only
long double acosh(
long double x
); // C++ only
float acoshf(
float x
);
long double acoshl(
long double x
);
Parameters
x
Floating-point value.
Return Value
The acosh
functions return the inverse hyberbolic cosine (arc hyperbolic cosine) of x
. These functions are valid over the domain x
≥ 1. If x
is less than 1, errno
is set to EDOM
and the result is a quiet NaN. If x
is a quiet NaN, indefinite, or infinity, the same value is returned.
Input | SEH Exception | _matherr Exception |
---|---|---|
± QNAN, IND, INF | none | none |
x < 1 | none | none |
Remarks
When you use C++, you can call overloads of acosh
that take and return float
or long double
values. In a C program, acosh
always takes and returns double
.
Requirements
Function | C header | C++ header |
---|---|---|
acosh , acoshf , acoshl |
<math.h> | <cmath> |
For additional compatibility information, see Compatibility.
Example
// crt_acosh.c
// Compile by using: cl /W4 crt_acosh.c
// This program displays the hyperbolic cosine of pi / 4
// and the arc hyperbolic cosine of the result.
#include <math.h>
#include <stdio.h>
int main( void )
{
double pi = 3.1415926535;
double x, y;
x = cosh( pi / 4 );
y = acosh( x );
printf( "cosh( %f ) = %f\n", pi/4, x );
printf( "acosh( %f ) = %f\n", x, y );
}
cosh
( 0.785398 ) = 1.324609
acosh
( 1.324609 ) = 0.785398
.NET Framework Equivalent
Not applicable. To call the standard C function, use PInvoke
. For more information, see Platform Invoke Examples.
See Also
Floating-Point Support
Long Double
cos, cosf, cosl, cosh, coshf, coshl
sin, sinf, sinl, sinh, sinhf, sinhl
asinh, asinhf, asinhl
tan, tanf, tanl, tanh, tanhf, tanhl
atanh, atanhf, atanhl
_CItan