TAL Programmer's Guide
Simple Variables by Data Type
Using Simple Variables
096254 Tandem Computers Incorporated 6–9
REAL Simple Variables A REAL simple variable can contain a signed 32-bit floating-point number in the range
±8.6361685550944446 * 10
-78
through ±1.15792089237316189 * 10
+77
, precise to
approximately seven significant digits.
The format of a REAL constant includes an integer part, a fractional part suffixed by E,
and an exponent. Here is an example of a REAL constant value:
356
-30.3E-2
Exponent
Fractional part
Integer part
Here are more examples of REAL constant values:
Decimal Value REAL
0 0.0E0
2 2.0e0
2 0.2E1
2 20.0E-1
-17.2 -17.2E0
-17.2 -1720.0E-2
Storage Allocation
The compiler allocates a doubleword of storage for each REAL simple variable:
REAL num := 2.0E0;
357
2.0E0