RE: [F+O] Division by zero question

Mike:

The spec does not say what to do for 0/0.  That was why I sent the
quote.  Our libraries return NaN in this situation.

If the dividend is non zero, they return +/- INF.

 

I agree that we need to clarify the behavior for 0/0 in the F&O.

All the best, Ashok 

________________________________

From: public-qt-comments-request@w3.org
[mailto:public-qt-comments-request@w3.org] On Behalf Of Michael Kay
Sent: Thursday, February 26, 2004 1:09 AM
To: Ashok Malhotra; public-qt-comments@w3.org
Subject: RE: [F+O] Division by zero question

 

 

I believe IEEE 754 lets you return NaN or +/- INF.  See quote below.

"7.2 Division by Zero.  If the divisor is zero and the dividend is a
finite nonzero number, then the division by zero exception shall be
signaled.  The result, when no trap occurs, shall be a correctly signed
INF (the spec has an infinity sign). (6.3)" 

Sorry, but how does this quote relate to the question of what result you
get when you divide zero by zero?

Mike

Received on Thursday, 26 February 2004 07:13:22 UTC