Chapter Contents

Previous

Next
RBw.d

RBw.d



Reads numeric data that are stored in real binary (floating-point) notation

Category: Numeric


Syntax
Syntax Description
Details
Comparisons
Examples
See Also

Syntax

RBw.d

Syntax Description

w
specifies the width of the input field.
Default: 4
Range: 2-8

d
optionally specifies the power of 10 by which to divide the value.
Range: 0-10


Details

Note:   Different operating environments store real binary values in different ways. However, the RBw.d informat reads real binary values with consistent results if the values are created on the same type of operating environment that you use to run SAS.  [cautionend]


Comparisons

The following table compares the names of real binary notation in several programming languages:

Real Binary Notation
Language 4 Bytes 8 Bytes
SAS RB4. RB8.
FORTRAN REAL*4 REAL*8
C float double
IBM 370 assembler F D
PL/I FLOAT BIN(21) FLOAT BIN(53)

CAUTION:
Using the RBw.d informat to read real binary information on equipment that conforms to the IEEE standard for floating-point numbers results in a truncated eight-byte number (double-precision), rather than in a true four-byte floating-point number (single-precision).   [cautionend]


Examples

input @1 x rb8.;   

Data Lines* Results
----+----1

4280000000000000
128
*The data line is a hexadecimal representation of a real binary (floating-point) number on an IBM mainframe operating environment. Each byte occupies one column of the input field.


See Also

Informat:

IEEEw.d


Chapter Contents

Previous

Next

Top of Page

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