math.h
来源:互联网 发布:mac虚拟机安装win7 编辑:程序博客网 时间:2024/05/18 02:40
1.求余
extern double fmod(double,double);
fmod(10.2,3) =1.2
2.四舍五入
extern double round(double);
round(10.5) =11
3.平方
extern double pow(double,double);
pow(3,4)=81
4.开方
extern double sqrt(double);
sqrt(16) =4
5.自然数 e ^ n
extern double exp(double);
exp(3) = pow(2.718281828,3) =20.085537
6.对数
extern double log(double); // e为底
extern double log10(double); // 10为底
log(20.085537) =3
log10(100) =2
5.绝对值
extern double fabs(double);
fabs(-10) =10
6.取整
extern double ceil(double); //向上
extern double floor(double);//向下
ceil(10.2) =11
floor(10.2) =10
7.求斜边
extern double hypot(double,double); //直角三角形两直边
hypot(3,4) =5
8.计算 x *2 ^ n
extern double ldexp(double,int);
ldexp(3,4)=3 *2 ^ 4 = 48
0 0
- math.h
- Math.h
- math.h
- math.h
- math.h
- math.h
- math.h
- math.h
- math.h
- compile with math.h
- C++ math.h
- 库函数(备忘)--math.h
- C++ math.h库函数
- 数学函数<math.h>
- cmath(math.h)
- math.h Log log10
- <cmath> (math.h)
- c <math.h>
- 内存堆管理器GenCollectedHeap分配对象内存及Gc触发
- asp网站程序启用浏览器和代理缓存
- SQLMAP源码阅读之盖览sqlmap.py
- 给webstorm配置ftp
- jquery 实现 点击按钮后倒计时效果,多用于实现发送手机验证码、邮箱验证码
- math.h
- [leetcode] Unique Path II
- java实现鼠标和键盘动作后台监听
- nginx 反向代理 端口设置问题
- Java复制文件工具类
- ECshop生成网站地图url
- spring使用quartz发布定时任务
- 删除 Provisioning Profile
- js 关于双击会触发两次单击的解决方法