SAS中取整函数(round、ceil、floor、int)用法详解
来源:互联网 发布:循环更新数据库 编辑:程序博客网 时间:2024/06/05 16:39
1.round
round(x,eps)求x按照eps指定的精度四舍五入后的结果.
比如round(5654.5654,0.01)结果为5654.57,round(5654.5654,10)结果为5650。
round 是截取函数
按规定舍入精度取一个数的近似值的函数round;
data; 运行结果
a=int(223.456); b=round(223.456, 100); a=223 b=200
c=round(223.456,10); d=round(223.456,1); c=220 d=223
e=round(223.456,0.1); f=round(223.456,0.01); e=223.5 f=223.46
put _all_;
run;
2.ceil
ceil(x): 返回大于等于x的最小整数,当x为整数时就是x本身。
3.floor
floor(x): 返回小于等于x的最大整数,当x为整数时就是x本身。
4.int
int(x): 返回x的整数部分,等价于Oracle中的trunc函数。
round(x,eps)求x按照eps指定的精度四舍五入后的结果.
比如round(5654.5654,0.01)结果为5654.57,round(5654.5654,10)结果为5650。
round 是截取函数
按规定舍入精度取一个数的近似值的函数round;
data; 运行结果
a=int(223.456); b=round(223.456, 100); a=223 b=200
c=round(223.456,10); d=round(223.456,1); c=220 d=223
e=round(223.456,0.1); f=round(223.456,0.01); e=223.5 f=223.46
put _all_;
run;
2.ceil
ceil(x): 返回大于等于x的最小整数,当x为整数时就是x本身。
3.floor
floor(x): 返回小于等于x的最大整数,当x为整数时就是x本身。
4.int
int(x): 返回x的整数部分,等价于Oracle中的trunc函数。
阅读全文
0 0
- SAS中取整函数(round、ceil、floor、int)用法详解
- 关于ceil、floor、round函数的用法
- ceil,floor,round,sprintf,int
- ceil() floor() round()的用法
- ceil() floor() round()的用法
- trunc、round、ceil、floor函数
- Math.floor,Math.ceil,Math.rint,Math.round用法详解
- Math.floor,Math.ceil,Math.rint,Math.round用法详解
- Math.floor,Math.ceil,Math.rint,Math.round用法详解
- Math.floor,Math.ceil,Math.rint,Math.round用法详解
- Math.floor,Math.ceil,Math.rint,Math.round用法详解
- matlab中几种取整函数的用法(fix, floor, ceil, round)
- PHP取整函数对比详解ceil,floor,round,intval
- MATLAB中取整函数(fix, floor, ceil, round)的使用
- MATLAB中取整函数(fix, floor, ceil, round)的使用
- MATLAB中取整函数(fix, floor, ceil, round)的使用
- MATLAB中取整函数(fix, floor, ceil, round)的使用
- MATLAB中取整函数(fix, floor, ceil, round)的使用
- 哭了!终于会打开下载的idea的各种项目了
- JVM——Java类加载机制总结
- js、css、jsp文件压缩
- 在网络通讯中,实现把一个int类型的值从服务器传输到另外一个电脑上
- ubuntu依赖包问题 版本问题
- SAS中取整函数(round、ceil、floor、int)用法详解
- cf 678E
- 75. Sort Colors
- java web 项目中可能出现乱码的原因
- 利用Java输出九九乘法表(从四个方向排列)
- C语言的const和指针
- D_D系统构建-篇外话
- Codeforces862 E. Mahmoud and Ehab and the function
- translate和ktranslate用法详解