pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
REAL(64)REALDecimal Value
20.0L-120.0E-1
-17.2 -17.2L0-17.2E0
-1720.0L-2-1720.0E-2
The system stores the number in binary scientific notation in the form:
x * 2y
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.
The system stores the parts of a floating-point constant as follows:
ExponentFractionSign BitData Type
<23:31><1:22><0>REAL
<55:63><1:54><0>REAL(64)
Examples of storage formats:
1. For the following REAL constant, the sign bit is 0, the fraction bits are 0, and the exponent
bits contain %400 + 2, or %402:
4 = 1.0 * 22 stored as %000000 %000402
2. For the following REAL constant, the sign bit is 1, the fraction bits contain %.2 (decimal .25
is 2/8), and the exponent bits contain %400 + 3, or %403:
-10 = -(1.25 * 23) stored as %120000 %000403
3. For the following REAL(64) constant, the sign bit is 0, the fraction bits contain the octal
representation of .33333..., and the exponent bits contain %400 - 2, or %376:
1/3 = .33333…* 2-2 stored as %025252 %125252 %125252 %125376
Constant Lists
A constant list is a list of one or more constants. You can use constant lists in:
• initializations of array declarations that are not contained in structures
• group comparison expressions
• move statements
You cannot use constant lists in assignment statements
Constants 63