TAL Reference Manual

Data Representation
TAL Reference Manual526371-001
3-15
Examples of REAL and REAL (64) Numeric
Constants
integer
is one or more decimal digits that compose the integer part.
fraction
is one or more decimal digits that compose the fractional part.
E and L
are suffixes that specify floating-point constants:
REAL E
REAL(64) L
exponent
is one or two decimal digits that compose the exponential part.
Examples of REAL and REAL (64) Numeric Constants
Here are the examples of REAL and REAL(64) numeric constants. The examples
show the integer part, the fractional part, the E or L suffix, and the exponent part:
Storage Format
The system stores the number in binary scientific notation in the form:
X * 2 Y
X is a value of at least 1 but less than 2. Because the integer part of X is always 1, only
the fractional part of X is stored.
The exponent can be in the range –256 through 255 (%377). The system adds 256
(%400) to the exponent before storing it as Y. Thus, the value stored as Y is in the
range 0 through 511 (%777), and the exponent is Y minus 256.
If the value of the number to be represented is zero, the sign is 0, the fraction is 0, and
the exponent is 0.
Decimal Value REAL REAL (64)
o
0.0E0 0.0L0
2
2.0e0
0.2E1
20.0E-1
2.0L0
0.2L1
20.0L-1
-17.2
-17.2E0
-1720.0E-2
-17.2L0
-1720.0L-2