C sinh()

C sinh() 原型

double sinh( double arg );

sinh() 函数接受一个参数,并返回 `double` 类型的值。

[Mathematics] sinhx = sinh(x) [In C programming]

它在 <math.h> 头文件中定义。

为了计算 long double 或 float 类型的数字的 sinh(),请使用以下原型。

long double sinhl( long double arg );
float sinhf( float arg );

C sinh() 范围

传递给 sinh() 函数的参数可以是任何数字,无论是负数还是正数。

示例:C sinh() 函数

#include <stdio.h>
#include <math.h>
#define PI 3.141592654

int main()
{
    double angle = 2.50, result;
    result = sinh(angle);
    printf("Sine hyperbolic of %.2lf (in radians) = %.2lf", angle, result);
    return 0;
}

输出

Sine hyperbolic of 2.50 (in radians) = 6.05
你觉得这篇文章有帮助吗?

我们的高级学习平台,凭借十多年的经验和数千条反馈创建。

以前所未有的方式学习和提高您的编程技能。

试用 Programiz PRO
  • 交互式课程
  • 证书
  • AI 帮助
  • 2000+ 挑战