Data Representation |
The default length of numeric variables in SAS data sets is 8 bytes. (You can change the length of SAS numeric variables with the LENGTH statement in the DATA step.) In SAS under OpenVMS, the data type of numeric variables is IEEE double precision or T_FLOATING. The precision of an OpenVMS T_FLOATING value is expressed as 15 decimal digits, with a range for T_FLOATING numeric variables of 1.7E+308 to 2.3E-308.
In addition, with OpenVMS T_FLOATING numbers, you must specify a minimum length of 3 bytes using the LENGTH statement in the DATA step.
The issue of numeric precision affects the return values of almost all SAS math functions and many numeric values returned from SAS procedures. The following table shows the number of nontruncated significant digits and the largest integers that can be represented exactly with no loss of precision for each of the specified lengths.
Length in Bytes | Significant Digits Retained | Largest Integer Represented Exactly |
---|---|---|
3 | 3 | 8,191 |
4 | 6 | 2,097,151 |
5 | 8 | 536,870,911 |
6 | 11 | 137,438,953,471 |
7 | 13 | 35,184,372,088,831 |
8 | 15 | 9,007,199,254,740,991 |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.