As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

Division by Zero - Relevance to Catastrophe

DrswordsDrswords Registered User regular
edited February 2010 in Help / Advice Forum
Okay. ill admit. Im horrible at math. My grasp is at a 9th grade level ( thats the last algebra i took ) ...


So the concept of Dividing by Zero somehow causing a catastrophe has escaped me for quite some time.

Science is a interest of mine, but only so much as i understand it.

So please... in layman's terms.. explain how Division by Zero = Catastrophe.

[SIGPIC][/SIGPIC]
Drswords on

Posts

  • Options
    Metal Gear Solid 2 DemoMetal Gear Solid 2 Demo Registered User regular
    edited February 2010
    Dividing by zero is mathematically impossible

    You can't 'divide' a zero sum value

    Metal Gear Solid 2 Demo on
    SteamID- Enders || SC2 ID - BurningCrome.721 || Blogging - Laputan Machine
    1385396-1.png
    Orikae! |RS| : why is everyone yelling 'enders is dead go'
    When I say pop it that means pop it
    heavy.gif
  • Options
    HiroconHirocon Registered User regular
    edited February 2010
    In most contexts, division by zero is undefined. If we tried to solve x=10/0, then we would need a number x such that 0*x = 10. There is no such number, because 0 times anything is zero. So, 10/0 is undefined; it has no meaning.

    In computer programs, attempting to divide a number by zero often causes the program to crash. It is a common programming error to perform division on two variables without first checking to see if the denominator is zero.

    Hirocon on
  • Options
    Salvation122Salvation122 Registered User regular
    edited February 2010
    Division is splitting something into parts.

    You can't split something into zero parts. It's a null question. It doesn't make any sense.

    In higher mathematics you get infinite values, which I freely admit I don't understand.

    In computing, it also results in infinite values, generally causing buffer overruns to happen (the value is too high for the variable to hold, generating a crash.) This is occasionally averted through error checking, which makes sure that divide by zero errors are caught before they're allowed to propagate.

    Salvation122 on
  • Options
    shadydentistshadydentist Registered User regular
    edited February 2010
    Drswords wrote: »
    Okay. ill admit. Im horrible at math. My grasp is at a 9th grade level ( thats the last algebra i took ) ...


    So the concept of Dividing by Zero somehow causing a catastrophe has escaped me for quite some time.

    Science is a interest of mine, but only so much as i understand it.

    So please... in layman's terms.. explain how Division by Zero = Catastrophe.

    Dividing by zero is also a problem in the sciences. In science, we often use mathematical models to simulate real systems. However, sometimes these models get into situations where a singularity occurs, which is basically where something might get divided by zero. The problem with singularities is that something approaches infinity as it nears a singularity, which is clearly an unphysical result. So the existence of singularities is of great consequence to scientists, who try to refine these models so that the singularities can be explained away and avoided.

    shadydentist on
    Steam & GT
    steam_sig.png
    GT: Tanky the Tank
    Black: 1377 6749 7425
  • Options
    SevorakSevorak Registered User regular
    edited February 2010
    In computing, it also results in infinite values, generally causing buffer overruns to happen (the value is too high for the variable to hold, generating a crash.) This is occasionally averted through error checking, which makes sure that divide by zero errors are caught before they're allowed to propagate.

    That's not why it causes crashes. It causes crashes because the CPU is specifically designed to say, "Divide by zero? WTF?! Stop that shit!" when an instruction causes it to attempt to divide by zero.

    Scientifically speaking of course.

    Sevorak on
    steam_sig.png 3DS: 0748-2282-4229
  • Options
    PlatyPlaty Registered User regular
    edited February 2010
    That's only the case if the program forbids division by zero. This "divide by zero" error is intended to avoid the kind of problems Salvation122 talked about. If there isn't any safeguard, the program will divide infinitely, causing it to crash.
    * On September 21, 1997, a divide by zero error on board the USS Yorktown (CG-48) Remote Data Base Manager brought down all the machines on the network, causing the ship's propulsion system to fail.[2]

    Platy on
  • Options
    admanbadmanb unionize your workplace Seattle, WARegistered User regular
    edited February 2010
    Note that as impressive as the disasters of dividing by zero sound, as far as programming is concerned dividing by zero isn't the problem, it's the symptom of the problem. The fact that you got a zero in a position where you were dividing is evidence of a bug somewhere else in your code.

    admanb on
  • Options
    musanmanmusanman Registered User regular
    edited February 2010
    Another line of thought people go with this is that wouldn't dividing by zero be infinity? I suppose it's not completely ridiculous to think you can divide something into infinitely many parts of zero...but unfortunately infinity isn't a number, and you also couldn't decide if it's "positive" or "negative" infinity.

    also this happens without too much trouble :)

    musanman on
    sic2sig.jpg
  • Options
    Eat it You Nasty Pig.Eat it You Nasty Pig. tell homeland security 'we are the bomb'Registered User regular
    edited February 2010
    to divide something into an infinite number of very tiny parts you would need to... divide by infinity, not by zero. The "pieces" aren't nonexistant, they're just really, really small.

    Eat it You Nasty Pig. on
    NREqxl5.jpg
    it was the smallest on the list but
    Pluto was a planet and I'll never forget
  • Options
    RiemannLivesRiemannLives Registered User regular
    edited February 2010
    Division is splitting something into parts.

    You can't split something into zero parts. It's a null question. It doesn't make any sense.

    In higher mathematics you get infinite values, which I freely admit I don't understand.

    In computing, it also results in infinite values, generally causing buffer overruns to happen (the value is too high for the variable to hold, generating a crash.) This is occasionally averted through error checking, which makes sure that divide by zero errors are caught before they're allowed to propagate.

    Actually, in higher mathematics the answer is still exactly the same: Division by zero is not defined. It has no answer.

    Now, if you look at what happens when you divide by a number very close to zero, but not actually zero, you find that the result is very large. And the closer you get to zero the larger it gets. This prompts some people to ask: "why not just define division by zero to be equal to infinity?". There are two problems there:

    1) Infinity is not a number either. It's just a shorthand way of expressing a rather abstract concept. So saying that 1/0 = infinity is exactly the same thing as saying 1/0 = undefined. In either case you get back a result which is Not A Number.

    2) As I said above, if you divide by a number close to zero you get a large result. But the problem is if you divide by a positive number close to zero you get a large positive result but if you divide by a negative number close to zero you get a large negative result. So even if you ignored problem #1 you would still have the problem of whether 1/0 = +infinity or -infinity. Because the result shoots off in different directions depending on whether you approach zero from the right or the left there is no way to define an answer to 1/0 which is continuous. This is a very, very important concept in mathematics but it is regretably outside the scope of what can be explained here. Suffice it to say, that the requirement of continuity of a function is critical to many important mathematical concepts.


    There are some very interesting ways to take this investigation further. For one thing, complex numbers (aka "imaginary numbers") are not ordered (there are no greater than and less than operators) so problem #2 is not an issue for complex numbers. But #1 still is a problem. There is a mathematical construct called a Riemann Sphere which is similar to the space of complex numbers in which division by zero is both defined and continuous.

    RiemannLives on
    Attacked by tweeeeeeees!
  • Options
    MerouanMerouan Registered User regular
    edited February 2010
    To paraphrase what Hirocon said, think about what it means to divide one number, say x, by another number, y.

    What is x/y? It is the number "A" such that y*A = x. So when we ask what is 15/5, we're looking for the number A such that 5*A = 15. We know that A is 3, so 15/5 = 3. What about when y is 0? For any number x, x/0 asks us to find the following:

    Some number "A" such that A*0 = x. But A*0 = 0 for any A. So we can never find a number that will be multiplied by 0 and give a nonzero answer. Even in the case that x = 0, we can't define division because the answer would not be unique (we could choose A to be anything and it would still be true, so there is no meaning to 0/0).

    When people say 1/0 is infinity, what they really mean is the limit of 1/x as x approaches 0 is infinity (basically, as we take x closer and closer to 0, 1/x gets larger and larger... it actually never stops getting larger). 1/0 is not a number, it has no value, not even infinity. Infinity really only makes sense when you're discussing limits.

    Merouan on
  • Options
    CrystalMethodistCrystalMethodist Registered User regular
    edited February 2010
    In computing, it also results in infinite values, generally causing buffer overruns to happen (the value is too high for the variable to hold, generating a crash.)

    Quick heads up-- all of this is wrong. Buffer overruns have nothing to do with primitives and there is no such thing as "infinite values" except with IEEE floating point numbers, which have a single value for +infinity and -infinity. What happens is that a divide-by-zero exception is generated as a hardware interrupt by the processor, that gets handled by the OS, and the OS usually terminates the program.

    CrystalMethodist on
  • Options
    SevorakSevorak Registered User regular
    edited February 2010
    In computing, it also results in infinite values, generally causing buffer overruns to happen (the value is too high for the variable to hold, generating a crash.)

    Quick heads up-- all of this is wrong. Buffer overruns have nothing to do with primitives and there is no such thing as "infinite values" except with IEEE floating point numbers, which have a single value for +infinity and -infinity. What happens is that a divide-by-zero exception is generated as a hardware interrupt by the processor, that gets handled by the OS, and the OS usually terminates the program.

    Thank you. If it happened like described, it wouldn't even cause an error, because a register overflowing does not cause a hardware interrupt except maybe in specialized CPUs.

    I prefer my explanation though :P

    Sevorak on
    steam_sig.png 3DS: 0748-2282-4229
  • Options
    TaximesTaximes Registered User regular
    edited February 2010
    I always used to wonder (before taking calc) why dividing by zero was undefined rather than giving you a result of infinity. The analogy I always thought of was something like:

    Say you have an empty tub with a volume of 20 gallons. You want to put water in it, and you plan on doing so by bringing back bucketfuls of water from a nearby river. You want to know how many trips you can make from the river, with the bucket, before the tub is full. If you know the volume of your bucket, you can figure it out.

    So, to calculate how many trips you have to make, you divide the container's total volume (20 gallons) by the volume of the bucket (let's say 2 gallons), and you discover that you can make 20/2 = 10 trips before the tub is full.

    What if your bucket was only 1 gallon? Well, then you'd be able to make 20/1 = 20 trips before it was full.

    What if it was half a gallon? 20/.5 = 40 trips.

    A quarter of a gallon? 80 trips.

    So, the number of trips increases as the size of the bucket decreases (as I'm sure you expected).

    What if you had a bucket that didn't hold any water at all (i.e. 0 gallons)? In that case, you could keep making trips to the river forever, because you could never make enough trips to fill the tub. You could make an infinite number of trips.

    Congratulations! You just calculated the limit of 1/x as x approaches 0, basically.

    So that's what people are thinking when they say something divided by zero is infinity. (to be mathematically correct, though, it is the limit that gives you infinity, because you still can't perform the division).

    The thing is, "infinity" isn't a defined value, either. It simply describes specifically how your answer is undefined. You can't ever fill up the tub with a 0 gallon bucket, because your necessary number of trips will become infinite.

    So, yes, division by zero is undefined. You can also think of division by zero as resulting in something going to infinity, if that makes sense to you, but that is still an "undefined" answer, for the same reason that you could never make an infinite amount of trips to fill up a tub.

    Taximes on
  • Options
    exmelloexmello Registered User regular
    edited February 2010
    So much talk, so little focus on the negative approach to zero, and the non-continuity. Really, lot of things are "defined" as infinity even if it isn't a number. x/0 is NOT infinity, it is undefined. There is a clear difference.

    exmello on
  • Options
    LemmingLemming Registered User regular
    edited February 2010
    The real-world implication of division by zero being impossible is that if you could, math simply breaks down.

    Say x = 0. You would agree that 1x = 2x, right? Because both sides equal zero. Now, divide both sides by x, and all of a sudden you have 1 = 2, which is clearly false.

    Lemming on
  • Options
    mspencermspencer PAX [ENFORCER] Council Bluffs, IARegistered User regular
    edited February 2010
    I think you guys are missing the point.

    In very early tube-based computers, division by zero caused physical hardware failures. Tubes would die and have to be replaced. Expensive.

    Now modern machines have exception handlers. Div by zero throws an exception interrupt with the "division by zero" exception info in the right place, context switch occurs, the operating system's exception handler is invoked, the operating system says "WHAT? Divison by zero? From one of MY programs? Hold on, let me get my belt." And a task abends and a cute error message appears on the screen.

    mspencer on
    MEMBER OF THE PARANOIA GM GUILD
    XBL Michael Spencer || Wii 6007 6812 1605 7315 || PSN MichaelSpencerJr || Steam Michael_Spencer || Ham NOØK
    QRZ || My last known GPS coordinates: FindU or APRS.fi (Car antenna feed line busted -- no ham radio for me X__X )
  • Options
    DemerdarDemerdar Registered User regular
    edited February 2010
    the limit of 1/x as x approaches 0 is infinity.

    1/0, however.. is undefined.

    Demerdar on
    y6GGs3o.gif
  • Options
    shadydentistshadydentist Registered User regular
    edited February 2010
    Demerdar wrote: »
    the limit of 1/x as x approaches 0 from the positive numbers is infinity.

    1/0, however.. is undefined.

    Fixed. This has been bugging me, as the limit of 1/x is negative infinity from the negative numbers.

    shadydentist on
    Steam & GT
    steam_sig.png
    GT: Tanky the Tank
    Black: 1377 6749 7425
  • Options
    GdiguyGdiguy San Diego, CARegistered User regular
    edited February 2010
    Taximes wrote: »
    I always used to wonder (before taking calc) why dividing by zero was undefined rather than giving you a result of infinity. The analogy I always thought of was something like:

    Say you have an empty tub with a volume of 20 gallons. You want to put water in it, and you plan on doing so by bringing back bucketfuls of water from a nearby river. You want to know how many trips you can make from the river, with the bucket, before the tub is full. If you know the volume of your bucket, you can figure it out.
    ...
    The thing is, "infinity" isn't a defined value, either. It simply describes specifically how your answer is undefined. You can't ever fill up the tub with a 0 gallon bucket, because your necessary number of trips will become infinite.

    So, yes, division by zero is undefined. You can also think of division by zero as resulting in something going to infinity, if that makes sense to you, but that is still an "undefined" answer, for the same reason that you could never make an infinite amount of trips to fill up a tub.

    The issue is that an infinite amount of trips is a "defined value", in the sense that it is specifically defined mathematically and some intuitive meaning - to continue your example, if I had a .000000000000001 gallon bucket, it would take millions of trips; if I then had a 10^-99 gallon bucket, it would take ~10^99 trips, etc etc, and infinite amount of trips as the bucket becomes smaller and smaller

    As you say, though, you can't ever fill up the tub with a 0 gallon bucket. However, it's not because the number of trips would become "infinite", as you say - it's because it's completely impossible. Even if you made an infinite amount of trips, you'd still have zero gallons of water (sum(0) from trip i=1 to i=infinity is zero)

    Gdiguy on
  • Options
    KonradexiusKonradexius Registered User new member
    edited February 2010
    Okay, so I think that the concept has been explained rather well, but we haven't really addressed the OP's question of catastrophe.

    Basically, it's this:

    Divide by Zero on Computer = Breaks computer (not really, but bear with me)

    Divide by Zero in Real Life = Breaks Real Life.


    That's about it, really.

    Konradexius on
  • Options
    BeltaineBeltaine BOO BOO DOO DE DOORegistered User regular
    edited February 2010
    Once we have a CPU that can divide by zero, Skynet will take over.

    Beltaine on
    XdDBi4F.jpg
    PSN: Beltaine-77 | Steam: beltane77 | Battle.net BadHaggis#1433
  • Options
    RuckusRuckus Registered User regular
    edited February 2010
    Beltaine wrote: »
    Once we have a CPU that can divide by zero, Skynet will take over.

    Either that, or starships powered by micro-singularities, like the Romulans.

    Ruckus on
  • Options
    DrswordsDrswords Registered User regular
    edited February 2010
    Thank you very much for all your answers. I think i understand the problem now.

    If anyone else has anything to add on the subject please do so.

    Drswords on
    [SIGPIC][/SIGPIC]
  • Options
    RookRook Registered User regular
    edited February 2010
    Drswords wrote: »
    Thank you very much for all your answers. I think i understand the problem now.

    If anyone else has anything to add on the subject please do so.

    I'll just add that this dividing by zero crops up quite a lot in physics. For example, General Relativity has a singularity at the centre of a black hole, an area of space with mass, but zero volume and hence infinite density. However this is generally considered a point at which the theory breaks down. Hence the need for a quantum gravity solution to the black hole problem, that will hopefully avoid messy singularities and come up with a better solution.

    (All my physics knowledge comes from wikipedia so may be totally wrong).

    Rook on
  • Options
    Beef AvengerBeef Avenger Registered User regular
    edited February 2010
    For visualization, just look at this graph.

    2196a_800px-Hyperbola_one_over_x.svg.png

    As you approach zero it goes to infinity.

    Beef Avenger on
    Steam ID
    PSN: Robo_Wizard1
  • Options
    bowenbowen How you doin'? Registered User regular
    edited February 2010
    Thanks fuckers, I hated calculus.

    That said, the number 0 in this context is really a concept more than an actual value. With real numbers, 0 really has no meaning in division. Like was explained earlier, you cannot partition something 0 times. The result will always be 'Not a number' or 'undefined'.

    When dividing 0 by 0, you have to know the originating number because of the inverse operation of multiplication, so this result set would also be undefined.

    Have fun with your calculus though.

    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    shadydentistshadydentist Registered User regular
    edited February 2010
    For visualization, just look at this graph.

    2196a_800px-Hyperbola_one_over_x.svg.png

    As you approach zero from the positive numbers it goes to infinity.

    shadydentist on
    Steam & GT
    steam_sig.png
    GT: Tanky the Tank
    Black: 1377 6749 7425
  • Options
    Beef AvengerBeef Avenger Registered User regular
    edited February 2010
    i didn't clarify positive or negative infinity, as it's not very relevant to the OPs question. Also it's pretty self evident from the graph

    Beef Avenger on
    Steam ID
    PSN: Robo_Wizard1
Sign In or Register to comment.