[Cfp-interest 1715] short hex strings

David Hough CFP pcfp at oakapple.net
Wed Jul 22 21:23:17 PDT 2020


"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.



More information about the Cfp-interest mailing list