[Cfp-interest 2111] AI about definitions of normal and subnormal

Jim Thomas jaswthomas at sbcglobal.net
Wed Aug 18 21:45:32 PDT 2021


Action item:
>     All: Look over CFP2096 and give feedback within 2 weeks.


[CFP 2096] suggested

> After 5.2.4.2.2 #4 [should be #5], and before the new paragraph proposed in [Cfp 2094], add:
> 
> A number whose magnitude (absolute value) is at least the minimum positive normalized floating-point number in the type and at most the maximum finite number in the type is a normal number.*) A nonzero number whose magnitude is less than the minimum positive normalized floating-point number in the type is a subnormal number. 
> 
> *) All normalized floating-point numbers are normal numbers. In IEC 60559 basic binary formats, the two are equivalent.
> 

Some concerns were discussed at the CFP meeting yesterday, and recorded in the minutes [Cfp-interest 2102]. 

After looking at IEC 60559's definitions of normal and subnormal numbers I’m convinced they are equivalent to the [CFP 2096] suggestion, but also that they show how to improve the [CFP 2096] suggestion and address the concerns.

IEC 60559 has:

normal number: For a particular format, a finite non-zero floating-point number with magnitude greater than or equal to a minimum b^emin value, where b is the radix. Normal numbers can use the full precision available in a format. …

…

subnormal number: In a particular format, a non-zero floating-point number with magnitude less than the magnitude of that format’s smallest normal number. A subnormal number does not use the full precision available to normal numbers of the same format.

Applying this approach for C 5.2.4.2.2 …

Finite numbers whose magnitude (absolute value) is at least b^(emin-1) are called normal numbers. Nonzero numbers whose magnitude is less than b^(emin-1) are called subnormal numbers.*)

*) Normal numbers and subnormal numbers include both floating-point numbers (in the model) and also any other numbers, of applicable magnitude, in the type. b^(emin-1) is the minimum magnitude of a normalized floating-point number in the type.

Note that the exponent in the C model is 1 greater than the exponent of the same number in the IEC 60559 model.

All this applies to decimal floating point too. The model in 5.2.4.2.2 and the alternate model in 5.2.4.2.3 used to discuss decimal types are equivalent by

. d1 d2 … dp * 10^e  <==>  d1 d2 … dp * 10^(e - p)

Numerically equal model representations correspond to a cohort.

Normalized floating-point numbers are defined by d1 > 0. Thus, in the alternate model, normalized numbers are represented with the full precision of the type. IEC 60559 says "Normal numbers can use the full precision available in a format”, which is consistent with “normalized” in C.

- Jim Thomas


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20210818/969286c9/attachment-0001.htm>


More information about the Cfp-interest mailing list