全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1658 2
2011-01-02
%put %sysevalf(1.-1.e-13,integer);值为1.
%put %sysevalf(1.-3.1,integer);值为-2.
为什么呢?帮助文件里面说表达式如果有缺失值,则结果返回缺失值,不知道如何理解
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2011-1-2 21:56:47
1.-1.e-13=1-1e-13
1.-3.1=1-3.1
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-1-3 21:22:08
If the result of the expression is within 10--12 of an integer, the function produces a character value representing that integer.
以上是SAS Help原话,即integer取整的精度在1e-12,在整数N加减1e-12范围内的,都被视作N
之后的SAS Help就是
If the result of the expression is positive, INTEGER returns the same result as FLOOR. If the result of the expression is negative, INTEGER returns the same result as CEIL. An expression with a missing value produces a missing value.
描述相关作取整的算法以及缺失值处理
希望对你有帮助,呵呵
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群