楼主: 孤灯渡漠
4020 16

[问答] 为什么明明一样的两个数字却能比出大小 在线等 [推广有奖]

11
孤灯渡漠 发表于 2013-6-19 15:56:33
zhengbo8 发表于 2013-6-19 14:40
想到个办法,把数值转为字符后,再比较字符大小,应该是不会错了。
这.....SAS应该不会这么弱智吧

12
zhengbo8 发表于 2013-6-19 15:58:43
主要是试试,排除是什么问题引起的。你最好,把数据贴出来,大家研究研究。

13
孤灯渡漠 发表于 2013-6-19 16:04:57
zhengbo8 发表于 2013-6-19 15:58
主要是试试,排除是什么问题引起的。你最好,把数据贴出来,大家研究研究。
好的,稍等

14
zhou.wen 发表于 2013-6-19 16:48:08
Imasasor 发表于 2013-6-19 14:17
你把变量format var best32.;
看一下,可能后面有很多小数点,确实不相等
I think you make a misunderstand
Formats determine how variable values are printed.
Here may use length..
Practice Is The Best Teacher!

15
zhou.wen 发表于 2013-6-19 16:54:21
All right!I am the silly one.forget what I say..
Practice Is The Best Teacher!

16
zhou.wen 发表于 2013-6-19 17:05:56
I guess it was due to the difference between informat and format.
The default value of infomart is best32. while format is best12.
The variables a and b wiill looks the same in datasets if a=11.1000000001 and b=11.1So I agree with @Imasasor
已有 1 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
Imasasor + 100 + 80 + 3 + 2 + 2 精彩帖子, 上周给坛友加分太少,我被扣币了

总评分: 经验 + 100  论坛币 + 80  学术水平 + 3  热心指数 + 2  信用等级 + 2   查看全部评分

Practice Is The Best Teacher!

17
孤灯渡漠 发表于 2013-6-20 10:29:33
zhou.wen 发表于 2013-6-19 17:05
I guess it was due to the difference between informat and format.
The default value of infomart is  ...
thanks

这个问题已经新开帖了,数据文件、程序、结果都已经贴上
新帖地址

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-1 06:21