[Cfp-interest] DFP and unary +

Ian McIntosh ianm at ca.ibm.com
Mon Jun 17 12:40:49 PDT 2013


The normal implementation of a unary + is to do nothing.  In that case any
non-canonical encodings are unchanged.

An alternate implementation is to add the value to zero.  Non-canonical
encodings would be made canonical.  I don't know of any implementations
that do that.

The wording should allow either.

This applies to BFP too, in cases like the sign of zero, and in some
non-IEEE implementations the exponent of zero.

- Ian McIntosh          IBM Canada Lab         Compiler Back End Support
and Development



|------------>
| From:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |"Fred J. Tydeman" <tydeman at tybor.com>                                                                                                             |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |"cfp-interest" <cfp-interest at ucbtest.org>                                                                                                         |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |06/13/2013 10:22 PM                                                                                                                               |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |[Cfp-interest] DFP and unary +                                                                                                                    |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Sent by:   |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |cfp-interest-bounces at oakapple.net                                                                                                                 |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|





Does a unary + operation propagate non-canonical encodings?

WG14 N1722 11.1 Operators says that Unary Arithmetic operators
in C11 follow the semantic of IEC 60559.  But, 60559 has
no mention of unary + operator.


---
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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20130617/729cf260/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20130617/729cf260/attachment.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20130617/729cf260/attachment-0001.gif 


More information about the Cfp-interest mailing list