Grant Edwards a écrit :
> On 2006-06-14, Christophe <[EMAIL PROTECTED]> wrote:
> 
>>Grant Edwards a écrit :
>>
>>>The division by zero trap is really annoying.  In my world the
>>>right thing to do is to return Inf.
>>
>>Your world is flawed then, this is a big mistake. NaN is the
>>only aceptable return value for a division by zero.
> 
> 
> You're probably right if you're talking about math, but I'm not
> doing math.  I'm doing engineering.  In all of the situations
> I've ever encountered, Inf was a much better choice.

You should have been more precise then : "In my ideal world, when 
dividing a non zero value by a zero value, the result should be +Inf or 
-Inf according the the sign rules"

On that point, you should also note that +0 and -0 are sometimes 
considered two different floating point numbers in Python :)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to