• Tom.Thomson (4/8/2010)


    Hugo Kornelis (4/8/2010)


    CirquedeSQLeil (4/8/2010)Is 0/0 = 1 or is 0/0 an error?

    To that question, my answer is a clear and resounding "yes"! 😛

    And mine is a resounding "sometimes"! Unless it's a resounding "perhaps"? 😀

    Of course to see why you have to understand what Barry was getting at with his talk of equations (I tend to talk about functions in that context, but it's the same thing). (If you're not interested in the mathematics of functions over the real plain, read no further).

    If you look at the function f(X,Y) = (2X/Y) and ask what its limit is as X and Y approach 0 you can see straight away that what the limit is depends on what path in the plane you follow to get to 0,0 (that's why in arithmetic 0/0 is undefined). If you start from the point X=1 Y=2 and follow a straight line to X=0 Y=0 the value everywhere along the line until you get to X=0 Y=0 the value is 1 everywhere along that line except at 0,0 so the limit at that point when you approach on that line is 1. So we can say that sometimes (for example when you walk down that line) 0/0 should probably be treated as 1. On the other hand, if you start from X=1 Y=0 and follow thre straight line to 0,0 every point produces an error; so if your on that line you had better treat 0/0 as an error. And if you start from X=1, Y=1 and follow a straight line to 0,0 the only value you see is 2. Of course it gets interesting if you don't follow a straight line: for example if you follow a spiral from somewhere to 0,0 you will see the value changing all the time, including very large negative values, very large positive values, everything in between, and errors - and although it changes in a nice regular pattern, there won't be (well, actually, this depends on the sort of spiral it is) a tendency towards some fixed value as you get closer to 0,0 so we can't say there's a limit value there on that path.

    We [ex]mathematicians are very lazy, so if the limit was the same on every path we would just say the value is defined and is that limit; but as it's not we say the value is undefined except in the context of a particular function and a particular path.

    Ouch! You nailed me there, I was actually too lazy to explain all of this ... 😛

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]