当前位置: 技术问答>linux和unix
Linux下C编程数学函数的用法,请教高手
来源: 互联网 发布时间:2016-05-29
本文导语: LINUX下C编程,定义了#include 的头文件。 然后我想求取sin cos tan log ln 这些数学值,有不有相关的函数,函数的具体用法也请举例说明一下。谢谢 | 这些是 C 标准库的内容,与 linux ...
LINUX下C编程,定义了#include 的头文件。
然后我想求取sin cos tan log ln 这些数学值,有不有相关的函数,函数的具体用法也请举例说明一下。谢谢
然后我想求取sin cos tan log ln 这些数学值,有不有相关的函数,函数的具体用法也请举例说明一下。谢谢
|
这些是 C 标准库的内容,与 linux 关系不大
Standard C Math
abs absolute value
acos arc cosine
asin arc sine
atan arc tangent
atan2 arc tangent, using signs to determine quadrants
ceil the smallest integer not less than a certain value
cos cosine
cosh hyperbolic cosine
div returns the quotient and remainder of a division
exp returns “e” raised to a given power
fabs absolute value for floating-point numbers
floor returns the largest integer not greater than a given value
fmod returns the remainder of a division
frexp decomposes a number into scientific notation
labs absolute value for long integers
ldexp computes a number in scientific notation
ldiv returns the quotient and remainder of a division, in long integer form
log natural logarithm (to base e)
log10 common logarithm (to base 10)
modf decomposes a number into integer and fractional parts
pow returns a given number raised to another number
sin sine
sinh hyperbolic sine
sqrt square root
tan tangent
tanh hyperbolic tangent
|
还是看看手册
http://www.cppreference.com/wiki/c/math/start
http://www.cppreference.com/wiki/c/math/start