对码当歌,猿生几何?

C库:通用数学库函数

Common mathematical functions

 C Numerics Common mathematical functions 

Functions

Defined in header <stdlib.h>
abslabsllabs(C99)computes absolute value of an integral value (|x|
(function)
divldivlldiv(C99)computes quotient and remainder of integer division 
(function)
Defined in header <inttypes.h>
imaxabs(C99)computes absolute value of an integral value (|x|
(function)
imaxdiv(C99)computes quotient and remainder of integer division 
(function)
Defined in header <math.h>
Basic operations
fabsfabsffabsl(C99)(C99)computes absolute value of a floating-point value (|x|
(function)
fmodfmodffmodl(C99)(C99)computes remainder of the floating-point division operation 
(function)
remainderremainderfremainderl(C99)(C99)(C99)computes signed remainder of the floating-point division operation 
(function)
remquoremquofremquol(C99)(C99)(C99)computes signed remainder as well as the three last bits of the division operation 
(function)
fmafmaffmal(C99)(C99)(C99)computes fused multiply-add operation 
(function)
fmaxfmaxffmaxl(C99)(C99)(C99)determines larger of two floating-point values 
(function)
fminfminffminl(C99)(C99)(C99)determines smaller of two floating-point values 
(function)
fdimfdimffdiml(C99)(C99)(C99)determines positive difference of two floating-point values (max(0, x-y)
(function)
nannanfnanl(C99)(C99)(C99)returns a NaN (not-a-number) 
(function)
Exponential functions
expexpfexpl(C99)(C99)computes e raised to the given power (ex
(function)
exp2exp2fexp2l(C99)(C99)(C99)computes 2 raised to the given power (2x
(function)
expm1expm1fexpm1l(C99)(C99)(C99)computes e raised to the given power, minus one (ex-1
(function)
loglogflogl(C99)(C99)computes natural (base-e) logarithm (ln(x)
(function)
log10log10flog10l(C99)(C99)computes common (base-10) logarithm (log10(x)
(function)
log2log2flog2l(C99)(C99)(C99)computes base-2 logarithm (log2(x)
(function)
log1plog1pflog1pl(C99)(C99)(C99)computes natural (base-e) logarithm of 1 plus the given number (ln(1+x)
(function)
Power functions
powpowfpowl(C99)(C99)computes a number raised to the given power (xy
(function)
sqrtsqrtfsqrtl(C99)(C99)computes square root (x
(function)
cbrtcbrtfcbrtl(C99)(C99)(C99)computes cubic root (3x
(function)
hypothypotfhypotl(C99)(C99)(C99)computes square root of the sum of the squares of two given numbers (x2
+y2

(function)
Trigonometric functions
sinsinfsinl(C99)(C99)computes sine (sin(x)
(function)
coscosfcosl(C99)(C99)computes cosine (cos(x)
(function)
tantanftanl(C99)(C99)computes tangent (tan(x)
(function)
asinasinfasinl(C99)(C99)computes arc sine (arcsin(x)
(function)
acosacosfacosl(C99)(C99)computes arc cosine (arccos(x)
(function)
atanatanfatanl(C99)(C99)computes arc tangent (arctan(x)
(function)
atan2atan2fatan2l(C99)(C99)computes arc tangent, using signs to determine quadrants 
(function)
Hyperbolic functions
sinhsinhfsinhl(C99)(C99)computes hyperbolic sine (sh(x)
(function)
coshcoshfcoshl(C99)(C99)computes hyperbolic cosine (ch(x)
(function)
tanhtanhftanhl(C99)(C99)computes hyperbolic tangent 
(function)
asinhasinhfasinhl(C99)(C99)(C99)computes inverse hyperbolic sine (arsinh(x)
(function)
acoshacoshfacoshl(C99)(C99)(C99)computes inverse hyperbolic cosine (arcosh(x)
(function)
atanhatanhfatanhl(C99)(C99)(C99)computes inverse hyperbolic tangent (artanh(x)
(function)
Error and gamma functions
erferfferfl(C99)(C99)(C99)computes error function 
(function)
erfcerfcferfcl(C99)(C99)(C99)computes complementary error function 
(function)
tgammatgammaftgammal(C99)(C99)(C99)computes gamma function 
(function)
lgammalgammaflgammal(C99)(C99)(C99)computes natural (base-e) logarithm of the gamma function 
(function)
Nearest integer floating-point operations
ceilceilfceill(C99)(C99)computes smallest integer not less than the given value 
(function)
floorfloorffloorl(C99)(C99)computes largest integer not greater than the given value 
(function)
trunctruncftruncl(C99)(C99)(C99)rounds to nearest integer not greater in magnitude than the given value 
(function)
roundlroundllround(C99)(C99)(C99)rounds to nearest integer, rounding away from zero in halfway cases 
(function)
nearbyintnearbyintfnearbyintl(C99)(C99)(C99)rounds to an integer using current rounding mode 
(function)
rintrintfrintllrintlrintflrintlllrintllrintfllrintl(C99)(C99)(C99)(C99)(C99)(C99)(C99)(C99)(C99)rounds to an integer using current rounding mode with 
exception if the result differs 
(function)
Floating-point manipulation functions
frexpfrexpffrexpl(C99)(C99)breaks a number into significand and a power of 2 
(function)
ldexpldexpfldexpl(C99)(C99)multiplies a number by 2 raised to a power 
(function)
modfmodffmodfl(C99)(C99)breaks a number into integer and fractional parts 
(function)
scalbnscalbnfscalbnlscalblnscalblnfscalblnl(C99)