05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

exponent == 0x1F<br />

A2.7.5 Flush-to-zero<br />

The value depends on which half-precision format is being used:<br />

Application Level Programmers’ Model<br />

IEEE Half-precision<br />

The value is either an infinity or a Not a Number (NaN), depending on the<br />

fraction bits:<br />

fraction == 0<br />

The value is an infinity. There are two distinct infinities:<br />

+∞ When S==0. This represents all positive<br />

numbers that are too big to be represented<br />

accurately as a normalized number.<br />

-∞ When S==1. This represents all negative<br />

numbers with an absolute value that is too<br />

big to be represented accurately as a<br />

normalized number.<br />

fraction != 0<br />

The value is a NaN, <strong>and</strong> is either a quiet NaN or a signaling NaN.<br />

The two types of NaN are distinguished by their most significant<br />

fraction bit, bit [9]:<br />

bit [9] == 0 The NaN is a signaling NaN. The sign bit<br />

can take any value, <strong>and</strong> the remaining<br />

fraction bits can take any value except all<br />

zeros.<br />

bit [9] == 1 The NaN is a quiet NaN. The sign bit <strong>and</strong><br />

remaining fraction bits can take any value.<br />

Alternative Half-precision<br />

The value is a normalized number <strong>and</strong> is equal to:<br />

-1S x 216 x (1.fraction)<br />

The maximum positive normalized number is (2-2-10) x 216 or 131008.<br />

The performance of floating-point implementations can be significantly reduced when performing<br />

calculations involving denormalized numbers <strong>and</strong> Underflow exceptions. In particular this occurs for<br />

implementations that only h<strong>and</strong>le normalized numbers <strong>and</strong> zeros in hardware, <strong>and</strong> invoke support code to<br />

h<strong>and</strong>le any other types of value. For an algorithm where a significant number of the oper<strong>and</strong>s <strong>and</strong><br />

intermediate results are denormalized numbers, this can result in a considerable loss of performance.<br />

In many of these algorithms, this performance can be recovered, without significantly affecting the accuracy<br />

of the final result, by replacing the denormalized oper<strong>and</strong>s <strong>and</strong> intermediate results with zeros. To permit<br />

this optimization, VFP implementations have a special processing mode called Flush-to-zero mode.<br />

Advanced SIMD implementations always use Flush-to-zero mode.<br />

<strong>ARM</strong> DDI 0406B Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. A2-39

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

Saved successfully!

Ooh no, something went wrong!