|
|
楼主

楼主 |
发表于 2010-7-13 21:00:25
|
只看该作者
胡说 - 关于SAS浮点数
感谢: jingju11,shiyiming,ahuige
[code:xis0tj0g]data _null_;
x=7.3;
x=x+0.1;
put x=;
if x EQ 7.4 then put "equals 7.4";
else put "not equal to 7.4";
run;
/*x=7.4*/
/*not equal to 7.4*/
/*X的值是7.4,但为什么put出来的是不等于呢*/
data _null_;
x=7.3;
x=x+0.2;
put x=;
if x EQ 7.5 then put "equals 7.4";
else put "not equal to 7.4";
run;
/*x=7.5*/
/*equals 7.4*/
/*X的值是7.5,怎么put出来的又是等于呢*/[/code:xis0tj0g]
[img:xis0tj0g]http://www.mysas.net/sns/attachment/201007/6/12_1278378094pRxh.jpg[/img:xis0tj0g]
[img:xis0tj0g]http://www.mysas.net/sns/attachment/201007/6/12_1278378098uaU7.jpg[/img:xis0tj0g]
[img:xis0tj0g]http://www.mysas.net/sns/attachment/201007/6/12_1278378101s9r9.jpg[/img:xis0tj0g] |
|