Next: 5.3  Denormals and Zeroes Up: 5  Floating-Point Formats Previous: 5.1  Classification of Formats     Contents

# 5.2  Normal Encodings

The exponent field of a normal encoding can be neither all 0's nor all 1's, and for an explicit format, the integer bit must be 1:

Definition 5.2.1   (normp) An encoding for a format is normal iff the following conditions hold:

(a) ;

(b) If is explicit, then .

Definition 5.2.2   (unsupp) An encoding for a format is unsupported iff the following conditions hold:

(a) is explicit ;

(a) ;

(b) .

Let be a normal encoding for a format with and . The significand field is interpreted as a -exact value in the interval , i.e., with an implied a radix point following the leading bit, which is 1, either explicitly or implicitly. The value encoded by is the signed product of this value and a power of 2 determined by the exponent field. Since it is desirable for the range of exponents to be centered at 0, this field is interpreted with a bias of , i.e., the value of the exponent represented is

which lies in the range

Thus, the decoding function is defined as follows.

Definition 5.2.3   (bias) The exponent bias of a format is .

Definition 5.2.4   (ndecode) If is a normal encoding for a format , then

The following is trivial consequence of Definition 5.2.4.

Lemma 5.2.1   (sgn-ndecode, expo-ndecode, sig-ndecode) Let be a normal encoding for a format and let . then

(a) ;

(b) ;

(c) .

Definition 5.2.5   (nrepp) Let be a format and let . Then is representable as a normal in iff the following conditions hold:

(a) ;

(b) ;

(c) is -exact.

The normal encoding of a representable value is derived as follows.

Definition 5.2.6   (nencode) If is representable as a normal in , then

where

The next two lemmas establish an inverse relation between the encoding and decoding functions, from which it follows that the numbers that admit normal encodings are precisely those that satify Definition 5.2.5.

(nrepp-ndecode, nencode-ndecode) If is a normal encoding for a format , then is representable as a normal in and

PROOF: Let , , , and . It is clear from Definition 5.2.4 that . By Lemma 5.2.1,

is a -bit vector, and

i.e., is -exact. Thus, is representable as a normal in .

It also clear from Definition 5.2.4 that
Suppose is implicit. Then by Definitions 5.2.6 and 5.1.4 and Lemmas 2.4.9 and 2.2.5,

The explicit case is similar.

(normp-nencode, ndecode-nencode) If is representable as a normal in a format , then is a normal encoding for and

PROOF: We give the proof for the implicit case; the explicit case is similar.

Let , , , and . By Lemma 2.4.1, is a -bit vector and by Lemma 2.4.7,

and

Since is a -bit vector,

by Lemma 2.2.5.

Since is -exact,

and by Lemma 4.1.8, , which implies

Finally, according to Definition 5.2.4,

We shall have occasion to refer to the smallest and largest positive numbers that admit normal representations.

Definition 5.2.7   (spn) For any format , .

(positive-spn, nrepp-spn, spn-smallest)
If is a format, then

(a) ;

(b) is representable as a normal in ;

(c) is representable as a normal in , then .

PROOF: It is clear that is positive and satisfies Definition 5.2.5. Moreover, if and is representable as a normal in , then since , by Lemma 4.1.3

Definition 5.2.8   (lpn) For any format , .

(positive-lpn, nrepp-lpn, lpn-largest)
If is a format, then

(a) ;

(b) is representable as a normal in ;

(c) If is representable as a normal in , then .

PROOF: It is clear that is positive and satisfies Definition 5.2.5. Let and . If is representable as a normal in , then by Definition 5.2.5, and is -exact. Thus, and by Lemma 4.2.21,

Next: 5.3  Denormals and Zeroes Up: 5  Floating-Point Formats Previous: 5.1  Classification of Formats     Contents
david.m.russinoff 2015-07-13