In article <[EMAIL PROTECTED]>, Grant Edwards <[EMAIL PROTECTED]> writes: |> |> > which IEEE 754 assumes that the code will test and take |> > appropriate action (which can be anything, including aborting |> > the program and replacing it by a NaN). See |> > http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf |> |> IEEE Std 754-1985, subclause 7.2 - Division by Zero |> |> "If the divisor is zero and the dividend is a finite nonzero |> number, then the division by zero shall be signaled. The |> result, when no trap occurs, shall be a correctly signed |> (infinity symbol)(6.3)." |> |> To me it looks like the spec specifically allows for a case |> where "no trap occurrs" and the result is Inf.
That is correct. And it is a mandatory case. But it does NOT say what the software should then do with the exception. Regards, Nick Maclaren. -- http://mail.python.org/mailman/listinfo/python-list