LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 8 Mar 2002 10:30:58 -0500
Reply-To:     Roger Lustig <rlustig@CBDCREDIT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Roger Lustig <rlustig@CBDCREDIT.COM>
Organization: Creative Business Decisions, Inc.
Subject:      Re: Length statement and numeric precision
Content-Type: text/plain; charset=us-ascii; format=flowed

Kevin: Try 9,999 and 10,001. *Some* integers will allow exact representation, and others will not. I think the manual's point is that you can't count on an integer being represented exactly above that level.

Roger

Kevin Roland Viel wrote:

> Greetings again, > > In three bytes, the largest integer that can exactly be represented on > IEEE system should be 8,191 (TS-654 states 8,192). The LENGTH statement > is supposed to "Specifies the number of bytes for storing variables". > Why am I able to see 10,000? > > 151 %put Version=&sysver OS=&SYSSCPL; > Version=8.2 OS=WIN_NT > 152 data _null_; > 153 length x 3; > 154 /* binary 01 1111 1111 1111 */ > 155 x=8191; > 156 put x=; > 157 /* binary 10 0000 0000 0000 */ > 158 x=8192; > 159 put x=; > 160 /* binary 10 0111 0001 0000 */ > 161 x=10000; > 162 put x=; > 163 run; > > x=8191 > x=8192 > x=10000 > NOTE: DATA statement used: > real time 0.01 seconds > cpu time 0.01 seconds > > > Regards, > > > Kevin > > Kevin Viel > Department of Epidemiology > Rollins School of Public Health > Emory University > Atlanta, Ga 30322 >


Back to: Top of message | Previous page | Main SAS-L page