The reason 0/0 is not usually defined to be 1 is that, "almost 0" / "nearly 0" is not always close to 1. This is expressed more precisely in calculus:

If for any error size, E, you can find an accuracy requirement, D, such that X and Y being within D of 0 means that X/Y will be within E of 1, then you could define 0/0 as 1.

There are cases where we can define some "edge case" calculation to have some specific value because doing so makes for a continuous function.

(Update) If you require X==Y (which is how you are thinking about it), then you do always get 1. But think of a 3-dimensional space where you fill in points where Z = X/Y. Then the plane where X==Y intersects with our graph such that we get Z==1 everywhere except at (X,Y)==(0,0). Which makes you think that Z==1 makes sense there.

But if you look at it other ways, you get different results. For example, look at the plane 2*X==Y and you'll think Z should be 2 at (X,Y)==(0,0).

Now, think of a circle of radius E around (X,Y)==(0,0) and intersect the vertical cylinder that passes through that with our graph. You get two curves, each that goes to both negative infinity and positive infinity (for Z) while always staying at distance E from the vertical line (X,Y)==(0,0).

So (X,Y) being almost (0,0) means that X/Y could be any value at all. So mathematicians don't define a value for 0/0.

And finally, (a much simpler argument) if you define 0/0==1, then 0/Y would be 0 for all but Y==0, which is exactly the type of problem you are complaining about.

        - tye (I'm nearly finished with almost explaining this)

In reply to (tye)Re: What is zero divided by zero anyway? by tye
in thread What is zero divided by zero anyway? by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.