[Cfp-interest 2098] Re: number classification macros, fpclassify and normal numbers

Vincent Lefevre vincent at vinc17.net
Mon Aug 16 06:49:59 PDT 2021


On 2021-08-13 15:08:03 -0600, Fred J. Tydeman wrote:
> The 32-bit decimal FP has 7 versions of the value 1:
> 0000001e0
> 0000010e-1
> 0000100e-2
> 0001000e-3
> 0010000e-4
> 0100000e-5
> 1000000e-6
> 
> Only the value with a leading non-zero digit is normalized.
> So, the other six are unnormals.  But, they should be
> considered normal floating-point numbers.

OK. So it seems that in C17, such unnormalized floating-point numbers
are regarded like the normalized floating-point numbers with the same
numerical value, possibly *except* for the formatted output functions
(printf, etc.) with conversion specifier a or A, for which the output
hexadecimal digit before the decimal point may be zero.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the Cfp-interest mailing list