[Cfp-interest 2947] round trip rounding

Jim Thomas jaswthomas at sbcglobal.net
Tue Nov 7 09:15:22 PST 2023


Regarding action item

>     Jim/David: Check IEEE-754 if there is a similar issue to CFP2899.



754-2019 5.12.2 NOTE 1 includes

— Conversions from a supported binary format bf to an external character sequence and back again
results in a copy of the original number so long as there are at least Pmin(bf ) significant digits
specified and the rounding-direction attributes in effect during the two conversions are round to
nearest rounding-direction attributes.

So 754 does not have the problem mentioned in Cfp-interest 2899.

Not mentioned in Cfp-interest 2899, 5.2.4.2.2 also has type_DIG macros which are the

— number of decimal digits, q, such that any floating-point number with q decimal digits can be rounded into a floating-point number with p radix b digits and back again without change to the q decimal digits

This property too requires to-nearest rounding. The requirement needs to be added to the type_DIG specification C 5.2.4.2.2. (I didn’t see a statement of this round-trip property in 754-2019.)

- Jim Thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20231107/b527148d/attachment.htm>


More information about the Cfp-interest mailing list