This section describes how E_{max}
and E_{min} (the maximum and minimum exponents available in a format)
and bias (the amount to be subtracted from the encoded exponent to form the
exponents value) are calculated. Except for the calculation of E_{limit},
these calculations are general for any format where the coefficient and
exponent are both integers.

1. Let *p *be
the precision (total length of the coefficient) of a format, in digits.

2. Let E_{max}
be the maximum positive exponent for a value in a format, as defined in IEEE
854. That is, the largest possible number is (10* ^{p}*-1) / (10

For example, if *p*=7 this is 9.999999
Χ 10^{Emax}.

3. The *exponent *needed
for the largest possible number is E_{max}(*p*1) (because, for
example, the largest coefficient when *p*=7 is 9999999, and this only
needs to be multiplied by

10^{Emax} /
10^{(p1)} to give the largest possible number.

4. E_{min}=E_{max}
(as defined by IEEE 854 for base 10 numbers). That is, the smallest normal
number is 10^{Emin}. The *exponent *needed for this number is E_{min}
(its coefficient will be 1).

5. The number of
exponents, E_{normals}, used for the normal numbers is therefore 2 Χ E_{max}
*p *+ 2. (The values E_{max} through 1, 0, and 1 through E_{max}(*p*1).)

6. Let E_{tiny}
be the exponent of the smallest possible (tiniest, non-zero) subnormal number
when expressed as a power of ten. This is E_{min} (*p*1). For
example. if *p*=7 again, the smallest subnormal is 0.000001 Χ 10^{Emin},
which is 10^{Etiny}.

The number of
exponents needed for the subnormal numbers, E_{subnormals}, is
therefore E_{min} E_{tiny}, which is *p * 1.

7. Let E_{range}
be the number of exponents needed for both the normal and the subnormal numbers;
that is, E_{normals} + E_{subnormals}. This is (2 Χ E_{max}
+ 1).

8. Place E_{tiny}
so its encoded exponent (the exponent with bias added) is 0 (the encoded
exponent cannot be less than 0, and we want an all-zeros number to be valid
hence an encoded exponent of 0 must be valid).

9. Let E_{limit}
be the maximum encoded exponent value available. For the formats in the
specification, this is 3 Χ 2* ^{ecbits} * 1, where

10. Then, the
number of exponent values available is E_{limit} + 1, which is 3 Χ 2*ecbits*.

11. Now, to
maximize E_{max}, E_{range} = E_{limit} + 1

That is, 2 Χ E_{max}
+ 1 = 3 Χ 2*ecbits*.

12. Hence: E_{max}
= (3 Χ 2*ecbits * 1)/2 = E_{limit}/2

Note that the divisions by 2 must be truncating integer division.

13. If E_{limit}
is odd (always the case in these encodings), one value of exponent would be
unused. To make full use of the values available, E_{min} remains as
the value just calculated, negated, and E_{max} is increased by one.7

Hence: E_{min}
= E_{limit}/2

and: E_{max}
= E_{limit}/2 + 1 (where the divisions by 2 are truncating integer
division).

14. And: bias** **=
E_{tiny} = E_{min} + *p * 1

For example, let E_{limit}
= 191 and *p *= 7 (the 32-bit format). Then:

E_{max} =
191/2 + 1 = 96

E_{min} =
95

E_{tiny} =
101

bias = 101

The parameters and derived values for all three formats are as follows:

Note that it is
also possible to consider the coefficients in these formats to have a decimal
point after the first digit (instead of after the last digit). With this view,
the bit patterns for the layouts are identical, but the bias would be decreased
by *p*1, resulting in the same value for a given number.

** **

** **