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

Henry:
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 
op:numeric-divide.

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



Hello,

     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.

Thanks,

Henry
[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
mailto:zongaro@ca.ibm.com

Received on Tuesday, 27 July 2004 17:33:54 UTC