acosh, acoshf, acoshl

From cppreference.com
< c‎ | numeric‎ | math
 
 
 
Common mathematical functions
Functions
Basic operations
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)(C99)(C99)
Exponential functions
(C99)
(C99)
(C99)
(C99)
Power functions
(C99)
(C99)
Trigonometric and hyperbolic functions
(C99)
acosh
(C99)
(C99)
Error and gamma functions
(C99)
(C99)
(C99)
(C99)
Nearest integer floating point operations
(C99)(C99)(C99)
(C99)
(C99)(C99)(C99)
Floating point manipulation functions
(C99)(C99)
(C99)
(C99)
Classification
(C99)
(C99)
(C99)
Types
(C99)(C99)
Macro constants
 
Defined in header <math.h>
float       acoshf( float arg );
(1) (since C99)
double      acosh( double arg );
(2) (since C99)
long double acoshl( long double arg );
(3) (since C99)
Defined in header <tgmath.h>
#define acosh( arg )
(4) (since C99)
1-3) Computes the inverse hyperbolic cosine of arg.
4) Type-generic macro: If the argument has type long double, acoshl is called. Otherwise, if the argument has integer type or the type double, acosh is called. Otherwise, acoshf is called. If the argument is complex, then the macro invokes the corresponding complex function (cacoshf, cacosh, cacoshl).

Parameters

arg - floating point value representing the area of a hyperbolic sector

Return value

If no errors occur, the inverse hyperbolic cosine of arg (cosh-1
(arg)
, or arcosh(arg)) on the interval [0, +∞], is returned.

If a domain error occurs, an implementation-defined value is returned (NaN where supported).

Error handling

Errors are reported as specified in math_errhandling.

If the argument is less than 1, a domain error occurs.

If the implementation supports IEEE floating-point arithmetic (IEC 60559),

  • if the argument is less than 1, FE_INVALID is raised an NaN is returned
  • if the argument is 1, +0 is returned
  • if the argument is +∞, +∞ is returned
  • if the argument is NaN, NaN is returned

Notes

Although the C standard names this function "arc hyperbolic cosine", the inverse functions of the hyperbolic functions are the area functions. Their argument is the area of a hyperbolic sector, not an arc. The correct name is "inverse hyperbolic cosine" (used by POSIX) or "area hyperbolic cosine".