楼主: cata1234
1181 2

how to display the more decimal? [推广有奖]

  • 0关注
  • 0粉丝

大专生

53%

还不是VIP/贵宾

-

威望
0
论坛币
3 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
215 点
帖子
19
精华
0
在线时间
83 小时
注册时间
2008-8-26
最后登录
2015-1-19

楼主
cata1234 发表于 2012-6-29 06:27:03 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
Example is
data test;
a=1/9;
run;
proc print data = test;
var a;
format a 19.16;
run;

However, the result shows 0.1111111111111100, rather than 0.1111111111111111 as I expected.

Please give me your warm hands to figure this out.
Thanks
二维码

扫码加我 拉你入群

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

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

关键词:Display decimal disp More play display figure result

沙发
bobguy 发表于 2012-6-29 07:11:48
Total it is 64 bits for a 8 byte number (SAS default)

    Sign bit: 1 bit
    Exponent width: 11 bits
    Significand precision: 53 bits (52 explicitly stored)



That is how precision digits it can go.

data _null_;
do i= 50 to 55;
  x=2**(-i);
  put i= x= 19.16;
  end;
run;

藤椅
cata1234 发表于 2012-6-29 08:44:24
Thanks. Your code is to generate the new data with 16 decimal. My purpose is to input and display the existing data with 16 decimal. Please let me know how to do.

e.g.
data test;
input a 19.16;
cards;
0.11111111111113112
;
run;
proc print data = test;
var a;
format a 19.16;
run;

The results is still
Obs a
1 0.1111111111111300, not 0.11111111111113112

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

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