[Cfp-interest] DFP and unary +

James W Thomas jaswthomas at sbcglobal.net
Mon Jun 17 18:48:05 PDT 2013


On Jun 17, 2013, at 3:58 PM, "Fred J. Tydeman" <tydeman at tybor.com> wrote:

> On Mon, 17 Jun 2013 15:40:49 -0400 Ian McIntosh wrote:
>> 
>> The normal implementation of a unary + is to do nothing.  In that case any
>> non-canonical encodings are unchanged.
> 
> That is fine with me.  And, I assume, SNaN is not triggered, hence,
> no exception is signaled (matches 5.5.1 of IEEE-754-2008).
> 
> Seems like we need words saying this in Part 2.
> 
> Since the Intel x87 has non-canonical encodings in binary FP
> of NaN and some sub-normals, this would also apply to Part 1.
> 

I don't think any additional words are needed. C11 says unary + returns the value of its operand, which implies that signaling NaNs are not triggered and does not preclude changing non-canonical encodings.

-Jim

> 
> 
> ---
> Fred J. Tydeman        Tydeman Consulting
> tydeman at tybor.com      Testing, numerics, programming
> +1 (775) 287-5904      Vice-chair of PL22.11 (ANSI "C")
> Sample C99+FPCE tests: http://www.tybor.com
> Savers sleep well, investors eat well, spenders work forever.
> 
> _______________________________________________
> Cfp-interest mailing list
> Cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest




More information about the Cfp-interest mailing list