From: Phillip Gawlowski Date: 2010-11-25T19:10:07+09:00 Subject: Re: Ruby 1.8 vs 1.9 On Thu, Nov 25, 2010 at 2:05 AM, Adam Ms. wrote: > > This is not even wrong. > > From the definitive source: > http://en.wikipedia.org/wiki/Division_by_zero For certain values of "definitive", anyway. > The IEEE floating-point standard, supported by almost all modern > floating-point units, specifies that every floating point arithmetic > operation, including division by zero, has a well-defined result. The > standard supports signed zero, as well as infinity and NaN (not a > number). There are two zeroes, +0 (positive zero) and -0 (negative zero) > and this removes any ambiguity when dividing. In IEEE 754 arithmetic, a > ÷ +0 is positive infinity when a is positive, negative infinity when a > is negative, and NaN when a = ±0. The infinity signs change when > dividing by -0 instead. Yes, the IEEE 754 standard defines it that way. The IEEE standard, however, does *not* define how mathematics work. Mathematics does that. In math, x_0/0 is *undefined*. It is not infinity (David kindly explained the difference between limits and numbers), it is not negative infinity, it is undefined. Division by zero *cannot* happen. If it would, we would be able to build, for example, perpetual motion machines. So, from a purely mathematical standpoint, the IEEE 754 standard is wrong by treating the result of division by 0.0 any different than dividing by 0 (since floats are only different in their nature to *computers* representing everything in binary [which cannot represent floating point numbers at all, much less any given irrational number]). -- Phillip Gawlowski Though the folk I have met, (Ah, how soon!) they forget When I've moved on to some other place, There may be one or two, When I've played and passed through, Who'll remember my song or my face.