曲径通幽论坛

标题: cosh() -- 双曲线余弦函数 [打印本页]

作者: beyes    时间: 2011-12-24 11:36
标题: cosh() -- 双曲线余弦函数
cosh() 原型如下:
[Plain Text] 纯文本查看 复制代码
#include <math.h>
double cosh(double x);

cosh() 用来计算参数 x 的双曲线余弦值并返回结果。双曲线余弦公式为:
[attach]140[/attach]
对应曲线如下图所示:


测试代码
[C++] 纯文本查看 复制代码
#include <stdio.h>
#include <math.h>

int main()
{
    double result = cosh(0.5);

    printf ("cosh(0.5) = %f\n", result);

    return 0;
}

运行输出:
./cosh
cosh(0.5) = 1.127626





欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) Powered by Discuz! X3.2