acosh、acoshf、acoshl

计算反双曲余弦。

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 );

参数

  • x
    浮点值。

返回值

acosh 函数返回 x 的反双曲余弦。 这些函数在 x ≥ 1 的域上有效。 如果 x 小于 1,则将 errno 设置为 EDOM 且结果是 quiet NaN。 如果 x 是 quiet NaN、不确定数或无穷大,则将返回相同的值。

输入

SEH 异常

_matherr 异常

± QNAN、IND、INF

x < 1

备注

使用 C++ 时,你可以调用采用并返回 float 或 long double 值的 acosh 重载。 在 C 程序中,acosh 始终采用并返回 double。

要求

函数

C 标头

C++ 标头

acosh, acoshf, acoshl

<math.h>

<cmath>

有关其他兼容性信息,请参见兼容性

示例

// 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 );
}
  

.NET Framework 等效项

不适用。若要调用标准 C 函数,请使用 PInvoke。有关详细信息,请参见平台调用示例

请参见

参考

浮点支持

长双精度

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