[Cfp-interest] Normalized numbers

Fred J. Tydeman tydeman at tybor.com
Mon Sep 24 11:36:37 PDT 2018


On Sat, 22 Sep 2018 17:08:22 -0700 Jim Thomas wrote:
>
>> On Aug 28, 2018, at 1:26 PM, Fred J. Tydeman <tydeman at tybor.com> wrote:
>> 
>> On Tue, 28 Aug 2018 13:13:45 -0500 Rajan Bhakta wrote:
>>> 
>>>   Fred: Give reference to the C DR for normalized double double meaning 
>>> bits can be changed.
>> 
>> C defect (change) request 432 has:
>> 
>> Proposed Change
>> 
>> The first sentence in 5.2.4.2.2 #3 should be changed to:
>> 
>>  Floating types shall be able to represent normalized
>>  floating-point numbers (f1 > 0) and (positive or unsigned) zero. In
>>  addition, floating types may be able to contain other kinds of
>>  floating-point numbers, such as negative zero and subnormal 
>
>Good to have zero! Suggest changing "negative zero and subnormal floating-point numbers (x = 0, e = emin, f1 = 0) and 
>unnormalized ..." to "negative zero, subnormal floating-point numbers (x = 0, e = emin, f1 = 0), and unnormalized ...". 

OK.

>> C defect (change) request 467 has:
>> 
>> Proposed Change
>> 
>> In §5.2.4.2.2#1 after the definition of the floating point model
>> parameters, add:
>> 
>>  For each floating-point type: b, emin, emax, p are fixed constants. 
>
>Paragraph 2 says they're parameters for each floating-point type (not for each floating-point number). Isn't that sufficient? 
>Has anyone interpreted this incorrectly?

double-double could have a variable precision p.

> In §5.2.4.2.2#3 change:
>> 
>>  In addition to normalized floating-point numbers ( f1 > 0 if x != 0), 
>> 
>> to:
>> 
>>  In addition to normalized floating-point numbers ( f1 > 0 if x != 0),
>>  all possible fk digits result in values representable in the
>>  type [footnote].
>
>What happens to the rest if the original sentence? 

It is a new sentence.  I see that is not clear in the DR.

>The proposed words suggest that normalized floating-point numbers 
>don't include representations with all possible fk digits. 

I do not see how you conclude that.

>I believe the common interpretation is that a floating-point type 
>must include all normalized floating-point numbers in the model, i.e., all values of the formula for f1 > 0.

Agreed.  That is what I am trying to add.

>>  footnote: Some implementations may have types with numeric values
>>  which are not covered by this model.
>
>What is the intention of the footnote? We already say "floating types may contain other kinds of  floating-point numbers".

To point out that double-double has additional values.
But, I see you point about "may contain other ..."

>> In 5.2.4.2.2#12, first item change the phrase
>> 
>>  maximum representable finite floating-point number, [ math formula ] 
>> 
>> to
>> 
>>  maximum representable finite floating-point number; if that value is
>>  normalized, its value is [ math formula ],
>
>The standard refers to "normalized floating-point number", not "normalized floating-point value".

Agreed.
 
>> In 5.2.4.2.2#13, first item change the phrase
>> 
>>  the difference between 1 and the least value greater than 1 
>> 
>> to
>> 
>>  the difference between 1 and the least normalized value greater than 1
>
>As above, use "number" instead of "value".

Agreed.

>If this is intended to fit double-double into the standard, how are e and p defined for double-double?

No.


---
Fred J. Tydeman        Tydeman Consulting
tydeman at tybor.com      Testing, numerics, programming
+1 (702) 608-6093      Vice-chair of PL22.11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.



More information about the Cfp-interest mailing list