[Cfp-interest 1701] Re: C++ floating-point work

Jim Thomas jaswthomas at sbcglobal.net
Sun Jul 19 17:27:36 PDT 2020


David,

A few comments …

A new numbered update to N2405 might be available by early Aug.

Would it be possible to write portable dual-language code that uses the C extended floating types (that support the IEEE extended formats)? 

Saying “For the purpose of conversion, infinity and NaN are treated just like any other numbers” is vague. Are signaling and quiet NaNs separate values? Are all quiet (all signaling) NaNs the same value? Do any significant implementations have unsigned infinity or unsigned zero?

Are binary and decimal types ordered if the values of one are a subset of the other? Note that different quantizations of an IEEE decimal value become indistinguishable when converted to IEEE binary.

For usual arithmetic conversions, where types have the same values, C TS3 prefers interchange floating types over standard floating types and standard floating types over (C) extended floating types. C++ prefers standard floating types over (C++) extended floating types. 


C doesn’t specify decimal complex types. C++ does. (Just noting.)

- Jim Thomas

> On Jun 15, 2020, at 11:04 AM, David Olsen <dolsen at nvidia.com> wrote:
> 
> 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 <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 <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
>  
> <p1467r4.html>_______________________________________________
> Cfp-interest mailing list
> Cfp-interest at oakapple.net <mailto:Cfp-interest at oakapple.net>
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest <http://mailman.oakapple.net/mailman/listinfo/cfp-interest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20200719/480a3f4a/attachment.htm>


More information about the Cfp-interest mailing list