余弦公式在c语言里面怎么用_c语言中cos函数的用法

展开全部同学,以下请仔细参详, 不是有意做长, 实在是都有用32313133353236313431303231363533e4b893e5b19e31333231383935.Trigonometry Functions (Sample)The sample code below illustrates how to use trigonometry (sin, cos, tan, and so...
摘要由CSDN通过智能技术生成

展开全部

同学,以下请仔细参详, 不是有意做长, 实在是都有用32313133353236313431303231363533e4b893e5b19e31333231383935.

Trigonometry Functions (Sample)

The sample code below illustrates how to use trigonometry (sin, cos, tan, and so on) functions in Visual C++.

Required Header:

Prototype:

// acos

template

inline valarray acos(const valarray& x);

// asin

template

inline valarray asin(const valarray& x);

// atan

template

inline valarray atan(const valarray& x);

// atan2

template

inline valarray atan2(const valarray& x, const valarray& y);

template

inline valarray atan2(const valarray x, const T& y);

template

inline valarray atan2(const T& x, const valarray& y);

// cos

template

inline valarray cos(const valarray& x);

// cosh

template

inline valarray cosh(const valarray& x);

// sin

template

inline valarray sin(const valarray& x);

// sinh

template

inline valarray sinh(const valarray& x);

// tan

template

inline valarray tan(const valarray& x);

// tanh

template

inline valarray tanh(const valarray& x);

Note: The class/parameter names in the prototype do not match the version in the header file. Some have been modified to improve readability.

Description:

This article illustrates the use of STL trigonometry functions through sample code.

Sample Code:

//

//

// Compile options needed: /GX

//

// main.cpp : Illustrates the use of STL trigonometry functions.

//

// Functions:

//

// acos, asin, atan, atan2, cos, cosh, sin, sinh, tan, tanh

//

#include // for i/o functions

#include // for valarray

#include // for trigonometry functions

using namespace std ;

#define ARRAY_SIZE 3 // array

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值