[cfp-interest 3905] Re: Trailing Decimal Exponent on a Hexadecimal standard floating type
Paul Zimmermann
Paul.Zimmermann at inria.fr
Mon Apr 20 22:56:54 PDT 2026
Hi Damian,
> Why does a heximdecimal float mandate a trailing deimal exponent, e.g p+23
> in something like
>
> 0x1.5abp+23
It is more readable by humans than 0x1.5abp+0x17.
I take the opportunity to ask whether one should standardize the way
hexadecimal numbers are printed: 0x1.5abp+23 or 0x2.b56p+22 or
0x5.6acp+21 or 0xa.d58p+20. I prefer 0x1.5abp+23 since the magnitude
is easier to guess.
Rationale: different libraries use different conventions, which makes
it difficult to compare results.
There is also the issue of subnormal numbers. Some libraries print
them as say 0x0.000000000001p-1074, which is a good way to see it
is a subnormal.
Paul
More information about the cfp-interest
mailing list