非规格化数字(denormalized numbers)

In computer science, denormal numbers or denormalized numbers (now often called subnormal numbers) fill the underflow gap around zero in floating point arithmetic: any non-zero number which is smaller than the smallest normal number is 'sub-normal'.

 
In a normal floating point value there are no leading zeros in the significand, instead leading zeros are moved to the exponent. So 0.0123 would be written as 1.23 * 10-2. Denormal numbers are numbers where this representation would result in an exponent that is too small (the exponent usually having a limited range). Such numbers are represented using leading zeros in the significand.
在正常的浮点数中, 有效数部分开头的不是0,0被移动到指数部分去了,比如0.0123会被表示为1.23*2-2。Denormal numbers就是指数部分非常小的数字。这些数字的有效数部分首位用0来表示。


The significand (or mantissa) of an IEEE number is the part of a floating point number that represents the significant digits. For a positive normalised number it can be represented as m0.m1m2m3...mp-2mp-1 (where m represents a significant digit and p is the precision, and m0 is non-zero). Notice that for a binary radix, the leading binary digit is one. In a denormal number, since the exponent is the least that it can be, zero is the lead significand digit (0.m1m2m3...mp-2mp-1) in order to represent numbers closer to zero than the smallest normal number.
 
By filling the underflow gap like this, significant digits are lost, but not to the extent as when doing flush to zero on underflow (losing all significant digits all through the underflow gap). Hence the production of a denormal number is sometimes called gradual underflow because it allows a calculation to lose precision slowly when the result is small.
 
In IEEE 754-2008, denormal numbers are renamed subnormal numbers, and are supported in both binary and decimal formats. In binary interchange formats, subnormal numbers are encoded with a biased exponent of 0, but are interpreted with the value of the smallest allowed exponent, which is one greater (i.e., as if it were encoded as a 1). In decimal interchange formats they require no special encoding because the format supports unnormalized numbers directly.

Some implementations of VFP use support code to handle denormalized numbers. The performance of such systems, in calculations involving denormalized numbers, is much less than it is in normal calculations.

Flush-to-zero mode replaces denormalized numbers with 0. This does not comply with IEEE 754 arithmetic, but in some circumstances can improve performance considerably.

NEON and VFPv3 flush-to-zero preserves the sign bit. VFPv2 flush-to-zero flushes to +0.

NEON always uses flush-to-zero mode.

原文地址:https://www.cnblogs.com/whyandinside/p/2496552.html