[Cfp-interest 2302] Re: Usual arithmetic conversions for long double and _FLoat64

Jim Thomas jaswthomas at sbcglobal.net
Tue Dec 21 16:01:26 PST 2021



> On Nov 23, 2021, at 3:25 PM, David Olsen <dolsen at nvidia.com> wrote:
…

>  
> >> Are you suggesting that there be a special rule that applies only to long double + _Float64 when they have the same formats?
> 
> Yes.  There would be a special rule that, when the sets of values are equivalent, the result type of long double + _Float64 would be long double.  I can’t think of a better way to specify it given how the arithmetic conversion rules are defined.

The special rule would be something like: In http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2601.pdf <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2601.pdf> in X.4.2, after “Otherwise, if both operands are floating types and the sets of values of their corresponding real types are equivalent, then the following rules are applied:” insert

If the corresponding real types of the operands are _Float64 and long double, the operand whose corresponding real type is _Float64 is converted, without change of type domain, to a type whose corresponding real type is long double.

Otherwise, …

- Jim Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20211221/8b66cabf/attachment.htm>


More information about the Cfp-interest mailing list