1毯炮、?三角函數(shù)?
double sin (double);正弦?
double cos (double);余弦?
double tan (double);正切?
2 逼肯、反三角函數(shù)?
double asin (double); 結(jié)果介于[-PI/2, PI/2]?
double acos (double); 結(jié)果介于[0, PI]?
double atan (double); 反正切(主值), 結(jié)果介于[-PI/2, PI/2]?
double atan2 (double, double); 反正切(整圓值), 結(jié)果介于[-PI, PI]?
3 、雙曲三角函數(shù)?
double sinh (double);?
double cosh (double);?
double tanh (double);?
4 桃煎、指數(shù)與對數(shù)?
double exp (double);求取自然數(shù)e的冪?
double sqrt (double);開平方?
double log (double); 以e為底的對數(shù)?
double log10 (double);以10為底的對數(shù)?
double pow(double x, double y);計(jì)算以x為底數(shù)的y次冪?
float powf(float x, float y); 功能與pow一致篮幢,只是輸入與輸出皆為浮點(diǎn)數(shù)?
5 、取整?
double ceil (double); 取上整?
用法:向上取整ceil(3.123333)=4 ceilf(3.123333)=4
double floor (double); 取下整?
?用法: ?向下取整 floor(3.123333)=3
6 为迈、絕對值?
double fabs (double);求絕對值?
double cabs(struct complex znum) ;求復(fù)數(shù)的絕對值?
7 三椿、標(biāo)準(zhǔn)化浮點(diǎn)數(shù)?
double frexp (double f, int *p); 標(biāo)準(zhǔn)化浮點(diǎn)數(shù), f = x * 2^p, 已知f求x, p ( x介于[0.5, 1] )?
double ldexp (double x, int p); 與frexp相反, 已知x, p求f?
8 、取整與取余?
double modf (double, double*); 將參數(shù)的整數(shù)部分通過指針回傳, 返回小數(shù)部分?
用法:兩數(shù)整除之后的余數(shù)fmod(9, 8)=1.00
double fmod (double, double); 返回兩參數(shù)相除的余數(shù)?
用法:double x, fractpart, intpart;
? ? ? ? x = 8.123456;
? ? ? ? fractpart = modf(x, &intpart);
整數(shù)部分 = 8.000000
?小數(shù)部分 = 0.123456
9 曲尸、其他?
double hypot(double x, double y);已知直角三角形兩個(gè)直角邊長度赋续,求斜邊長度?
double ldexp(double x, int exponent);計(jì)算x*(2的exponent次冪)?
double poly(double x, int degree, double coeffs [] );計(jì)算多項(xiàng)式?
nt matherr(struct exception *e);數(shù)學(xué)錯(cuò)誤計(jì)算處理程序
原作者鏈接:http://www.reibang.com/p/6badf54b7c06