C 库函数 - cosh()

C 语言教程 · 2019-02-23 07:12:43

描述

C 库函数 double cosh(double x) 返回 x 的双曲余弦。

声明

下面是 cosh() 函数的声明。

double cosh(double x)

参数

  • x -- 浮点值。

返回值

该函数返回 x 的双曲余弦。

实例

下面的实例演示了 cosh() 函数的用法。

#include <stdio.h>
#include <math.h>

int main ()
{
   double x;

   x = 0.5;
   printf("%lf 的双曲余弦是 %lf\n", x, cosh(x));

   x = 1.0;
   printf("%lf 的双曲余弦是 %lf\n", x, cosh(x));

   x = 1.5;
   printf("%lf 的双曲余弦是 %lf\n", x, cosh(x));

   return(0);
}

让我们编译并运行上面的程序,这将产生以下结果:

0.500000 的双曲余弦是 1.127626
1.000000 的双曲余弦是 1.543081
1.500000 的双曲余弦是 2.352410

点击查看所有 C 语言教程 文章: https://codercto.com/courses/l/17.html

查看所有标签

Domain-Driven Design Distilled

Domain-Driven Design Distilled

Vaughn Vernon / Addison-Wesley Professional / 2016-6-2 / USD 36.99

Domain-Driven Design (DDD) software modeling delivers powerful results in practice, not just in theory, which is why developers worldwide are rapidly moving to adopt it. Now, for the first time, there......一起来看看 《Domain-Driven Design Distilled》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具