Overview of IEEE Standard Single- and Double-Precision Formats

Figure 3−1 shows the fields of a single-precision floating-point number repre- sented within a 32-bit register.

Figure 3−1. Single-Precision Floating-Point Fields

31

30

23 22

0

 

s

 

e

 

f

 

 

 

 

 

 

Legend: s sign bit (0 = positive, 1 = negative)

e8-bit exponent ( 0 < e < 255)

f23-bit fraction

0 < f < 1*2−1 + 1*2−2 + ... + 1*2−23 or 0 < f < ((223)−1)/(223)

The floating-point fields represent floating-point numbers within two ranges: normalized (e is between 0 and 255) and denormalized (e is 0). The following formulas define how to translate the s, e, and f fields into a single-precision floating-point number.

Normalized:

 

−1s 2(e−127) 1.f

0 < e < 255

Denormalized (Subnormal):

−1s 2−126 0.f

e = 0; f nonzero

Table 3−4 shows the s,e, and f values for special single-precision floating- point numbers.

Table 3−4. Special Single-Precision Values

Symbol

Sign (s)

Exponent (e)

Fraction (f)

 

 

 

 

+0

0

0

0

−0

1

0

0

+Inf

0

255

0

−Inf

1

255

0

NaN

x

255

nonzero

QNaN

x

255

1xx..x

SNaN

x

255

0xx..x and nonzero

 

 

 

 

SPRU733

Instruction Set

3-11

Page 71
Image 71
Texas Instruments TMS320C67X/C67X+ DSP manual 4. Special Single-Precision Values, Symbol Sign s Exponent e Fraction f