[Cfp-interest 1721] Re: short hex strings
Paul Zimmermann
Paul.Zimmermann at inria.fr
Fri Jul 24 08:10:01 PDT 2020
Hi David,
for this kind of thing, I find giving a concrete example is very helpful for
the reader to understand the issue. The initial example where 3 can print as
0x2p+1 or 0x3p0 or 0x6p-1 or 0xcp-2 would be nice to add (interestingly, we
can't have 1 for the first hexadecimal digit, assuming rounding is to nearest).
Paul
> Date: Wed, 22 Jul 2020 21:23:17 -0700 (PDT)
> From: David Hough CFP <pcfp at oakapple.net>
>
>
> "295)Binary implementations can choose the hexadecimal digit to the left of the
> decimal-point character so that subsequent digits align to nibble (4-bit)
> boundaries."
>
> Action item: Come up with a sentence to add to footnote 295 (as per CFP
> 1697) to point out the possible numerical differences in output.
>
> I tried making one sentence, but it got complicated and confusing.
>
> Suggestion: add these sentences
>
> This implementation choice affects numerical
> values printed in short hexadecimal formats that can't represent all values
> exactly.
> Implementations with different conventions about the most significant
> hexadecimal digit will round at different places, affecting the numerical
> value of the hexadecimal result. Portable code seeking identical results on
> different platforms should avoid such short hexadecimal formats.
>
> _______________________________________________
> Cfp-interest mailing list
> Cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest
More information about the Cfp-interest
mailing list