Home C&C++函数库 c++ 语法 程序源码 Linux C库

sinh

函数  <cmath> <ctgmath>

C90 double sinh(double x);
C99 double sinh (double x);
float sinhf (float x);
long double sinhl (long double x);
C++98 double sinh (double x);
float sinh (float x);
long double sinh (long double x);
C++11 double sinh (double x);
float sinh (float x);
long double sinh (long double x);
double sinh (T x);    // additional overloads for integral types

计算双曲正弦
返回x的双曲正弦。
C99 头文件<tgmath.h> 提供了该函数的类型泛型宏版本。
C++98 这个函数在<complex>和<valarray> 中重载(参见complex sinh和valarray sinh)。
C++11 这个头文件(<cmath>) 为整型提供了额外的重载:这些重载在计算之前将x转换为double (在T是任何整型时定义)。
这个函数在<complex>和<valarray> 中也重载(参见complex sinh和valarray sinh)。

☲  参数


x
表示双曲角的值。

☉  返回值



返回x的双曲正弦。
如果结果的值太大,无法用返回类型的值表示,则该函数返回正确符号的HUGE_VAL (或HUGE_VALFHUGE_VALF或 HUGE_VALL), 并发生溢出范围错误:
C90(C++98) 如果发生域错误,则将全局变量errno设置为EDOM。
C99(C++11) 如果出现域错误:
-并且math_errhandling设置了MATH_ERRNO: 全局变量errno设置为 ERANGE。
-并且math_errhandling设置了MATH_ERREXCEPT: 触发FE_OVERFLOW

☣  示例



/* sinh example */
#include <stdio.h>      /* printf */
#include <math.h>       /* sinh, log */

int main ()
{
  double param, result;
  param = log(2.0);
  result = sinh (param);
  printf ("The hyperbolic sine of %f is %f.\n", param, result );
  return 0;
}

输出:
The hyperbolic sine of 0.693147 is 0.750000.

🍄  另请参阅



cosh 双曲余弦(函数)
tanh 双曲正切(函数)


联系我们 免责声明 关于CandCplus 网站地图