29.10.2014 Views

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Compiler</strong> Coding Practices<br />

5.47 Half-precision floating-point number <strong>for</strong>mat<br />

The half-precision floating-point <strong>for</strong>mats available are ieee and alternative. In both <strong>for</strong>mats,<br />

<strong>the</strong> basic layout of <strong>the</strong> 16-bit number is <strong>the</strong> same. See Figure 5-1.<br />

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

S E T<br />

Where:<br />

Figure 5-1 Half-precision floating-point <strong>for</strong>mat<br />

S (bit[15]):<br />

E (bits[14:10]):<br />

T (bits[9:0]):<br />

Sign bit<br />

Biased exponent<br />

Mantissa.<br />

The meanings of <strong>the</strong>se fields depend on <strong>the</strong> <strong>for</strong>mat that is selected.<br />

IEEE half-precision <strong>for</strong>mat is as follows:<br />

IF E==31:<br />

IF T==0: Value = Signed infinity<br />

IF T!=0: Value = Nan<br />

T[9] determines Quiet or Signalling:<br />

0: Quiet NaN<br />

1: Signalling NaN<br />

IF 0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!