[Cfp-interest 1639] Re: C++ floating-point work
Mike Cowlishaw
mfc at speleotrove.com
Mon Jun 15 11:47:19 PDT 2020
Hi David, thanks for posting this! I just took a quick skim through
P1467R4.html ; one sentence caught my eye:
When an implementation supports both binary and decimal floating-point,
the conversion ranks of a binary type and a decimal type will always be
unordered, because neither type's set of values will be a subset of the
other due to the different radixes.
This is not right; binary floating-point types can always be a subset of
appropriate decimal floating-point types because the latter have a base of
5*2 (in C/C++ notation), so you can make an exact conversion using the same
number of digits. Decimal floating-point-types, however, cannot be
converted exactly to binary types (in general) because of that power of
five.
See <http://speleotrove.com/decimal/decifaq1.html>
http://speleotrove.com/decimal/decifaq1.html for some of the background,
rationale, etc.
Mike
_____
From: Cfp-interest [mailto:cfp-interest-bounces at oakapple.net] On Behalf Of
David Olsen
Sent: 15 June 2020 19:04
To: CFP
Subject: [Cfp-interest 1638] C++ floating-point work
I am one of the authors of the C++ proposal P1467 "Extended floating-point
types", which has similar goals to the _FloatN work that CFP is doing, in
that it adds additional optional floating-point types to the standard. The
next revision of the proposal is available,
https://isocpp.org/files/papers/P1467R4.html (and also attached to this
message). I welcome any feedback that CFP might have, especially about the
"C Compatibility" section,
https://isocpp.org/files/papers/P1467R4.html#c-compat . Am I representing
the C proposal correctly? Are there other incompatibilities between the C
and C++ proposals that I am not seeing? The C++ Committee would like to do
a better job than we have in the recent past of keeping C and C++ from
diverging unnecessarily, so we are soliciting feedback from the C community
while C++ proposals are still under development when there is overlap
between C and C++.
--
David Olsen
NVIDIA HPC Compiler Team, WG21 member
Portland, Oregon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20200615/64270618/attachment.htm>
More information about the Cfp-interest
mailing list