cmath(math.h)

来源:互联网 发布:js文字展开折叠效果 编辑:程序博客网 时间:2024/05/21 17:52

转载来自kb神的推荐:http://cplusplus.com/reference/clibrary/cmath/

很多基础的东西都没有记住啊敲打

注意数据类型的定义,貌似用double比较保险的说。。。

header

cmath (math.h)

C numerics library
cmath declares a set of functions to compute common mathematical operations and transformations:

Trigonometric functions:

Hyperbolic functions:

Exponential and logarithmic functions:

Power functions
Rounding, absolute value and remainder functions:

C函数名: fmod

  功 能: 计算x对y的模, 即x/y的求余运算 (参见百科词条 mod 中的“求余函数” 条目),若y是0,则返回NaN。
  用 法: double fmod(double x, double y);

原创粉丝点击