SAS Formats under Windows |
Writes values real-binary (floating-point) format.
Category |
numeric
|
Width range: |
2-8
|
Default width: |
4
|
Decimal range: |
0-10
|
Alignment: |
left
|
Windows specifics: |
native floating-point representation
|
See: |
RBw.d in
SAS Language Reference: Dictionary
|
-
w
-
specifies the width of the output field.
-
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.
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.
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
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.