Chapter Contents |
Previous |
Next |
IEEEw.d |
Category: | Numeric |
Syntax | |
Syntax Description | |
Details | |
Examples |
Syntax |
IEEEw.d |
Default: | 8 |
Range: | 2-8 |
Tip: | If w is 8, an IEEE double-precision, floating-point number is read. If w is 5, 6, or 7, an IEEE double-precision, floating-point number is read, which assumes truncation of the appropriate number of bytes. If w is 4, an IEEE single-precision, floating-point number is read. If w is 3, an IEEE single-precision, floating-point number is read, which assumes truncation of one byte. |
Details |
The IEEEw.d informat is useful in operating environments where IEEE is the floating-point representation that is used. In addition, you can use the IEEEw.d informat to read files that are created by programs on operating environments that use the IEEE floating point representation.
Typically, programs generate IEEE values in single precision (4 bytes) or double precision (8 bytes). Truncation is performed by programs solely to save space on output files. Machine instructions require that the floating-point number be of one of the two lengths. The IEEEw.d informat allows other lengths, which enables you to read data from files that contain space-saving truncated data.
Examples |
input test1 ieee4.; input test2 ieee5.;
Data Lines* | Results |
---|---|
----+----1----+ |
|
3F800000 |
1 |
3FF0000000 |
1 |
*The data lines are hexadecimal representations of binary numbers that are stored in IEEE format. |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.