RBw.d Format: Windows

Writes values real-binary (floating-point) format.
Category: numeric
Alignment: left
Default: 4
Ranges: 2–8, 0–10
Windows specifics: native floating–point representation
See: RBw.d Format in SAS Formats and Informats: Reference

Syntax

RBw.d

Required Arguments

w
specifies the width of the output field.
Default:4
Range:2–8
d
specifies a scaling factor. When you specify a d value, the RBw.d format multiplies the number by 10d, and then applies the real binary format to that value.
Range:0–10

Details

The RBw.d format writes numeric data in real binary (floating-point) notation. Numeric data for scientific calculations are commonly represented in floating-point notation. (SAS stores all numeric values in floating-point notation.) A floating-point value consists of two parts: a mantissa that gives the value and an exponent that gives the value's magnitude.
Real binary is the most efficient format for representing numeric values because SAS already represents numbers this way and no conversion is needed.
For more information about Windows floating-point notation, see the Intel developer Web site.

Example: Processing a Number That Is Too Large To Format

When a numeric value is too large to format, as in this example
data a;
   x = 1e308;
   y = put(x, RB8.2);
   put y = hex16.;
run;
the result is
y=0000000000D1FFFF