W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2004

RE: [F&O]: Result of arithmetic involving Inf

From: Ashok Malhotra <ashok.malhotra@oracle.com>
Date: Tue, 27 Jul 2004 14:28:33 -0700
To: Henry Zongaro <zongaro@ca.ibm.com>, public-qt-comments@w3.org
Message-ID: <20040727142833026.00000000704@amalhotr-pc>

I believe you are referring to adding, subtracting and multiplying a finite
number by +/- INF.  In this case, it seems reasonable that the result should be
+/- INF.  Also, INF + INF = INF and -INF - (-INF) = -INF.

While these seem reasonable, I come to that conclusion by inference from what
IEEE-754 does say and not from any direct statement therein.  If you were 
quoting directly from 754 please provide a reference.  I could not find one.

I suggest we remove statement you objected to and add notes to op:numeric-add/subtract/multiply, covering these cases, similar to the note we added for 

All the best, Ashok

-----Original Message-----
From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-request@w3.org]On Behalf Of Henry Zongaro
Sent: Tuesday, July 27, 2004 1:37 PM
To: public-qt-comments@w3.org
Subject: [F&O]: Result of arithmetic involving Inf


     According to section 6.2 of the 2004-07-23 Working Draft of F&O, "For 
op:numeric-add, op:numeric-subtract and op:numeric-multiply if either 
operand is INF or -INF the result is NaN."

     I believe that statement is not consistent with IEEE-754. Multiplying 
a zero value by an Infinity, adding Infinities that have opposite signs, 
or subtracting Infinities that have the same sign should result in NaN. In 
addition, adding, subtracting or multiplying an Infinity and a NaN should 
result in a NaN.  Other combinations involving an operand with infinite 
magnitude will result in an infinity with the appropriate sign.


[1] http://www.w3.org/TR/2004/WD-xpath-functions-20040723/#op.numeric
Henry Zongaro      Xalan development
IBM SWS Toronto Lab   T/L 969-6044;  Phone +1 905 413-6044
Received on Tuesday, 27 July 2004 17:33:54 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:20 UTC