N2326: DRs 432+467


Submitter:Fred Tydeman
Submission Date: 2018年12月12日
Document: WG14 N2326
Reference Documents: N1677, N1870, N1871, N2092

Summary

This is the combined fixes for DRs 432 and 467 against C2X.

The vocabulary document (ISO/IEC 2382:2015) does not define "normalized floating point number". It does define "normalization" as shifting the mantissa (and adjusting exponent) so that the mantissa is in a specific range.

If long double is a pair of doubles and the high double has the value DBL_MAX and the low double has the value (DBL_MIN-DBL_TRUE_MIN), the leftmost digit is non-zero, yet this is not a normalized floating point number. That number has 53 one bits, followed by around 2000 zero bits, followed by 52 one bits. None of the 2000 zero bits can be one (otherwise the DBL_MIN-DBL_TRUE_MIN part will be lost).

Suggested Technical Corrigendum:

In §5.2.4.2.2 #2 after the definition of the floating point model parameters, add:

(追記) For each floating-point type: b, p, emin, and emax, are fixed constants (追記ここまで).

The first sentance in §5.2.4.2.2 #3

A floating-point number (x) is defined by the following model:

should be changed to:

(追記) For each floating-point type, a (追記ここまで)(削除) A (削除ここまで) floating-point number (x) is defined by the following model:

The first sentance in §5.2.4.2.2 #4

In addition to normalized floating-point numbers (f1 > 0 if x!=0), floating types may be able to contain other kinds of floating-point numbers, such as subnormal floating-point numbers ....

should be changed to:

(削除) In addition to (削除ここまで) (追記) Floating types shall be able to represent zero (all fk = 0) and all (追記ここまで) normalized floating-point numbers (f1 > 0 (削除) ; 0 if x!=0 (削除ここまで) (追記) and all possible k digits and e exponents result in values representable in the typefootnote (追記ここまで)). In addition, floating types may be able to contain other kinds of floating-point numbers, such as (追記) negative zero, (追記ここまで) subnormal floating-point numbers ....

(追記) footnote: Some implementations may have types with finite numeric values which are not covered by this model. (追記ここまで)

In §5.2.4.2.2 #13, first item (*_MAX), change the phrase

maximum representable finite floating-point number, [ math formula ]

to

maximum representable finite floating-point number(追記) ; if that number is normalized, its value is (追記ここまで) [ math formula ],

In §5.2.4.2.2#14, first item (*_EPSILON), 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

AltStyle によって変換されたページ (->オリジナル) /