The nominal value can be a signed (see 1 in Table 1) integer, fraction, or mixed number (see 2 Table 1) followed by a signed exponent (see 3 in Table 1). If a sign is not specified for either the number or exponent, a plus sign is assumed.
The exponent must lie within the permissible range. If an exponent modifier is also specified, the algebraic sum of the exponent and the exponent modifier must lie within the permissible range.
Subfield | Value | Example |
---|---|---|
1. Duplication factor | Allowed | |
2. Type | E, D, and L | |
3. Type Extension | Omitted or H or Q | |
4. Program type | Allowed | |
5. Modifiers | ||
Length: |
E-type: |
|
Implicit length: |
E-type: 4 bytes |
|
Alignment: |
E-type: Fullword |
|
Scale: |
E-type: 0 to 5 |
|
Exponent: |
-85 to +75 | |
6. Nominal value | ||
Represented by: |
Decimal digits |
E-type: |
Enclosed by: |
Apostrophes | |
Exponent allowed: |
Yes |
E-type: |
Rounding mode |
Yes (see Figure 1 |
E-type: |
Number of values |
|
|
Padding: |
Correct fraction is extended |
|
Truncation of |
|
The format of the constant is shown in Figure 2.
A sign bit (see 3 in Figure 2) indicates whether a positive or negative number has been specified. The number specified must first be converted into a hexadecimal fraction before it can be assembled into the correct internal format. The quantity expressed is the product of the fraction (see 4 in Figure 2) and the number 16 raised to a power (see 5 in Figure 2). Figure 2 shows the external format of the three types of floating-point constants.
Here is the range of values that can be assembled into hexadecimal floating-point constants:
Type of |
Range of Magnitude (M) of Values |
---|---|
E | 16-65 ≤ M ≤ (1-16-6) x 1663 |
D | 16-65 ≤ M ≤ (1-16-14) x 1663 |
L | 16-65 ≤ M ≤ (1-16-28) x 1663 |
E, D, L | 5.4 x 10-79 ≤ M ≤ 7.2 x 1075 (approximate) |
Type │ Called │ Format ─────┼────────────┼──────────────────────────────────────────────────────────────── E │ Short │ 1 7 bit Characteristic 2 24 bit Fraction EH │ Floating- │ 3 + ┌──────────┴──────────┐ ┌────────────┴────────────┐ │ Point │ │ ┌───┬─────────────────────┐ ┌───────────/ /───────────┐ │ Number │ └> └───┴─────────────────────┘ └───────────/ /───────────┘ │ │ - │ │ Bits 0 1 7 8 31 │ │ │ │ │ │ D │ Long │ 7 bit Characteristic 56 bit Fraction DH │ Floating- │ + ┌──────────┴──────────┐ ┌────────────┴────────────┐ │ Point │ ┌───┬─────────────────────┐ ┌───────────/ /───────────┐ │ Number │ └───┴─────────────────────┘ └───────────/ /───────────┘ │ │ - │ │ Bits 0 1 7 8 63 │ │ │ │ │ │ │ │ High-order 56 bits L │ Extended │ 7 bit Characteristic of 112 bit Fraction LH │ Floating- │ + ┌──────────┴──────────┐ ┌────────────┴────────────┐ LQ │ Point │ ┌───┬─────────────────────┐ ┌───────────/ /───────────┐ │ Number │ └───┴─────────────────────┘ └───────────/ /───────────┘───┐ │ │ - │ │ │ Bits 0 1 7 8 63 │ │ │ │ │ │ ┌─────────────────────────────┘ │ │ │ │ │ │ Low-order 56 bits │ │ 7 bit Characteristic V of 112 bit Fraction │ │ + ┌──────────┴──────────┐ ┌────────────┴────────────┐ │ │ ┌───┬─────────────────────┐ ┌───────────/ /───────────┐ │ │ └───┴─────────────────────┘ └───────────/ /───────────┘ │ │ - ∧ │ │ Bits 0 1 │ 7 8 63 │ │ │ │ │ Set in second half │ │ of L-type constant Characteristic │ Hexadecimal Fraction ──────────────────┼────────────────────────────────── │ 4 │ a b c 5 16E X [ ─── + ─── + ─── + … ] │ 16 16² 16³ │
where a,b,c ... are hexadecimal digits, and E is an exponent that has a positive or negative value indicated by the characteristic