Chapter Contents

Previous

Next
IEEEw.d

IEEEw.d



Reads an IEEE floating-point value and divides it by 10 raised to the d th power

Category: Numeric


Syntax
Syntax Description
Details
Examples

Syntax

IEEEw.d

Syntax Description

w
specifies the width of the input field.
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.

d
specifies the power of 10 by which to divide the value.


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.

The first INPUT statement reads the first data line, and the second INPUT statement reads the next data line.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.