欢迎来到天天文库
浏览记录
ID:48128888
大小:46.94 KB
页数:2页
时间:2019-11-28
《math.h中的函数.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、一.math.h中的函数1三角函数doublesin(double);doublecos(double);doubletan(double);2反三角函数doubleasin(double);结果介于[-PI/2,PI/2]doubleacos(double);结果介于[0,PI]doubleatan(double);反正切(主值),结果介于[-PI/2,PI/2]doubleatan2(double,double);反正切(整圆值),结果介于[-PI/2,PI/2]3双曲三角函数doublesinh(double);d
2、oublecosh(double);doubletanh(double);4指数与对数doubleexp(doublex);e的x次方doublesqrt(doublex);x开根号doublelog(double);以e为底的对数doublelog10(double);以10为底的对数doublepow(doublex,doubley)//计算以x为底数的y次幂5取整doubleceil(double);取上整,比如ceil(3.2)=4.00(自己最后保留小数点吧)doublefloor(double);取下整,比如
3、floor(3.2)=3.000006绝对值intabs(int)doublefabs(double);doublecabs(structcomplexznum)//求复数的绝对值7标准化浮点数doublefrexp(doublef,int*p);标准化浮点数,f=x*2^p,已知f求x,p(x介于[0.5,1])doubleldexp(doublex,intp);与frexp相反,已知x,p求f8取整与取余doublemodf(double,double*);将参数的整数部分通过指针回传,返回小数部分doublefmo
4、d(double,double);返回两参数相除的余数9其他doublehypot(doublex,doubley);//已知直角三角形两个直角边长度,求斜边长度doubleldexp(doublex,intexponent);//计算x*(2的exponent次幂)二.string.h中的函数(字符串)1.strcpy(目标字符串,源字符串)2.strlen(字符串)3.strcmp(字符串A,源字符串B)4.strcat(目标字符串,源字符串)5.strlwr(字符串)6.strupr(字符串)Bykaka
此文档下载收益归作者所有