• Tayrtahn (unregistered)

    Regarding the last image, I have to ask: is page infinity of infinity the last page? An infinite set logically can't have a "last" page, but what page would the next page be labeled? :D

  • (cs)

    Accept the mission! Everyone keeps an exotic dancer in their hold, but only a select few have a stack trace.

  • (cs) in reply to Ozz
    Ozz:
    http://en.wikipedia.org/wiki/The_Goon_Show

    Try http://en.wikipedia.org/wiki/Something_awful Those Goons!

  • Topp3rCod3r (unregistered) in reply to TopCod3r
    TopCod3r:
    There is an EASY way to prevent divide by zero errors, so easy that I am surprised they haven't built it into the .NET framework yet... Simply add 0.000000001 to the denominator. This is such a small number that it makes no significant difference to the result. I like to make a constant, something like this and it works like a champ...

    Const NODBZ As Double = 0.000000001 ...

    X = Y / (Z + NODBZ)

    Then just round it when you are done.

    That's no good. You see, some processors implement division by looking up the log tables stored on the bios. The tables have limited precision, so the division operation has the same limits. Therefore, I do all my division like this

    divide (n, d) { q = 0 label 10; if (n > d) {n = n-d; q++; goto 10}; return q }

  • (cs) in reply to Jetts
    Jetts:
    Hey Farva, whats the name of that online game you like to play? You know the MMORPG with the space ships?

    Isn't it something like ADAM Online?

  • mudkipz (unregistered) in reply to JimM
    JimM:
    Of course, that doesn't really help, because any number is divisible by zero (the result is undefined, but the number itself is divisible by zero), or indeed any other number (For instance, 38.53 is divisible by 10).

    Every pair of subjects and verbs in that run on sentence contains a mathematical mistake.

    No number is divisible by zero. Except MAYBE 0 itself, depending on the context. In grown up math, a number m divides a number n if there is a number a such that ma = n. This is the definition. If m is zero and n isn't, we cannot have ma = n since ma = 0.

    This is The Real WTF.

  • (cs) in reply to Harrow
    Harrow:
    TopCod3r:
    There is an EASY way to prevent divide by zero errors, so easy that I am surprised they haven't built it into the .NET framework yet... Simply add 0.000000001 to the denominator. This is such a small number that it makes no significant difference to the result. I like to make a constant, something like this and it works like a champ...

    Const NODBZ As Double = 0.000000001 ...

    X = Y / (Z + NODBZ)

    Then just round it when you are done.

    Now that you've become famous for this, what do you do if you ever want to post a comment that is not a troll?

    -Harrow?

    Why, use another account of course.

  • derf (unregistered) in reply to Topp3rCod3r
    Topp3rCod3r:
    TopCod3r:
    There is an EASY way to prevent divide by zero errors, so easy that I am surprised they haven't built it into the .NET framework yet... Simply add 0.000000001 to the denominator. This is such a small number that it makes no significant difference to the result. I like to make a constant, something like this and it works like a champ...

    Const NODBZ As Double = 0.000000001 ...

    X = Y / (Z + NODBZ)

    Then just round it when you are done.

    That's no good. You see, some processors implement division by looking up the log tables stored on the bios. The tables have limited precision, so the division operation has the same limits. Therefore, I do all my division like this

    divide (n, d) { q = 0 label 10; if (n > d) {n = n-d; q++; goto 10}; return q }

    Why not just multiply by a fraction and avoid the issue altogether?

  • Mathias (unregistered) in reply to Mike D.
    Mike D.:
    Math Whore:
    This is an easy one. Infinity is not a number - it's a concept. Infinity-1 is not a valid equation and therefore does not result in a valid number. It would be akin to saying that orange-1 is less than orange - it just doesn't make sense.
    The mathematically correct way of putting it is: "Infinity plus or minus any finite number is indistinguishable from infinity." I say "is indistinguishable from" instead of "is equal to" because the = operator (in math, not CS) isn't useful with infinity. You really need limits and other Calculus nastiness to play with infinities and not break something.
    Hooray, we're getting closer to Truth(tm). Infinity is a limit, and an important one at that. Those that haven't learned this should go finish their college degree or however the American school system works.

    Captcha: nulla

  • Mathias (unregistered) in reply to Topp3rCod3r
    Topp3rCod3r:
    divide (n, d) { q = 0 label 10; if (n > d) {n = n-d; q++; goto 10}; return q }
    Welcome to the world of integer division. However, you still haven't solved the problem of d == 0 && n != 0.
  • TheSabre (unregistered) in reply to Math Whore
    Math Whore:
    This is an easy one. Infinity is not a number - it's a concept. Infinity-1 is not a valid equation and therefore does not result in a valid number. It would be akin to saying that orange-1 is less than orange - it just doesn't make sense.

    Orange is a not a quantantative concept. That is the reason it doesn't make sense; not simply because it's only a concept.

    "Many" is a concept too, and a quantantative one at that. Saying "many minus one" or "many plus one" makes perfect sense and you should still know that the answer is "many".

  • (cs) in reply to TopCod3r
    TopCod3r:
    There is an EASY way to prevent divide by zero errors, so easy that I am surprised they haven't built it into the .NET framework yet... Simply add 0.000000001 to the denominator.
    And that is why if you were on MY team, you'd be on call 24/7, and not allowed to drink, or you'd be fired. No drinking, I mean it. Or you'd be fired.
  • The_Assimilator (unregistered) in reply to Uber
    Uber:
    If you accept the exception mission, does their bug tracking system assign the bug to you?

    Sadly not.

    Thankfully the mission itself still works, that exception message only occurs because the game is unable to find the correct string to display. I must admit, I laughed my pants off the first time I got that one...

    p.s. The game is EVE Online. The Goons will eventually get tired of it and start spoiling another MMORPG, so it's not really a problem.

  • Jay (unregistered) in reply to Math Whore

    [quote user="Math Whore]This is an easy one. Infinity is not a number - it's a concept. Infinity-1 is not a valid equation and therefore does not result in a valid number. It would be akin to saying that orange-1 is less than orange - it just doesn't make sense.[/quote]

    Hmm, that's like saying that the problem is meaningless because "1" is not a number: It's a numeral!

  • Jay (unregistered) in reply to Topp3rCod3r
    Topp3rCod3r:
    TopCod3r:
    There is an EASY way to prevent divide by zero errors, so easy that I am surprised they haven't built it into the .NET framework yet... Simply add 0.000000001 to the denominator. This is such a small number that it makes no significant difference to the result. I like to make a constant, something like this and it works like a champ...

    Const NODBZ As Double = 0.000000001 ...

    X = Y / (Z + NODBZ)

    Then just round it when you are done.

    That's no good. You see, some processors implement division by looking up the log tables stored on the bios. The tables have limited precision, so the division operation has the same limits. Therefore, I do all my division like this

    divide (n, d) { q = 0 label 10; if (n > d) {n = n-d; q++; goto 10}; return q }

    There's a simple and obvious solution to this:

    int divide(int n,int d,PrintWriter out,Reader in)
    {
      while (true)
      {
        out.println("Enter your guess for "+n+" divided by "+d);
        int q=Integer.valueOf(in.readln());
        if (q*d==n)
          return q;
        out.println("Sorry, that's incorrect. Try again.");
      }
    }
    

    Note this completely avoids all divide-by-zero problems.

  • /Arthur (unregistered) in reply to derf

    With X = y * (1/Z) EVE still don't avoid the problem

  • Jay (unregistered) in reply to Daedalus
    Daedalus:
    The US message should be something like: You got no money fool! Would you like to apply for credit Y/N?

    I thought the US version would be: "Your account is empty. How much money would you like the government to give you in a bailout? Note: Number must be divisible by $10 billion."

  • BobJ (unregistered) in reply to LightStyx
    LightStyx:
    rd:
    I'm not really sure, but I think it's EVE Online. Maybe someone else can verify.

    Congrats, you are the seventh person to point out this game. Yes, the screenshot is from EVE Online during a portion where a player is in a hangar, talking to an agent, and getting breifed on a mission. The game is riddled with Goons so don't bother playing unless you want to be raped by a bunch of drunken Irish, Scottish, and British men with nothing better to do but be ass pirates.

    Lucky sarcasm isn't lost on you....

  • Pedant (unregistered) in reply to TheSabre
    TheSabre:
    "Many" is a concept too, and a quantantative one at that. Saying "many minus one" or "many plus one" makes perfect sense and you should still know that the answer is "many".

    Umm....Not enitrely. It makes sense, but not PERFECT sense....

    "many minus one" is still "many" - this feels good intuititvely.... but that would mean that "many minus many" is still "many" (since do some recursive "many minus one"s) - that still feels possible intuitively, but not definite...

    Here lies our problem...we need something definite (and perhaps that's the problem, many is not a finite concept but refers to a finite group).

    if we repeat "many minus one" enough times, we will reach "not many".

    Just because something seems intuitive doesn't mean it's correct.

    Etc, etc.....

    </rant>

    Oh, and for the record, I think one of the screenshots was from EVE Online.....

  • (cs) in reply to Walleye
    Walleye:
    Lets see, Peter Sellers was English, Spike Milligan was Irish and Harry Secombe was Welsh. So who is the Scottish goon that you're referring to?
    Anybody who knows anything about the Goons knows the answer to this one: Ray Ellington, obviously.

    Am I the only one to shudder at the following assertion?

    Gorfblot:
    FWIW, on the ATMs I've worked on that number is stored in a XML file on the ATM itself, and can be either explicitly defined or set to lowest denomination of bills in stock.
    For pity's sake. XML? Why?

    Incidentally, the answer everybody is looking for is "EVE Online." Whatever that is.

  • (cs)

    I think the game is called something like TopCod3r Online. The one everyone is playing, not the one pictured. (The game pictured was obviously prepared for FILE_NOT_FOUND)

  • Bizzle (unregistered) in reply to Foobar
    Foobar:
    Let's see how funny you are going to find it once someone picks up TopCod3r's code and causes the next Ariane rocket crash or something similar.

    Are you suggesting that rocket scientists would use code from some random poster on a message board?

    Captcha: opto How simple...

  • A (unregistered) in reply to Mark

    I'm just surprised he got to page infinity. How long did that take him to get there?

  • bob (unregistered) in reply to TopCod3r
    TopCod3r:
    There is an EASY way to prevent divide by zero errors, so easy that I am surprised they haven't built it into the .NET framework yet... Simply add 0.000000001 to the denominator. This is such a small number that it makes no significant difference to the result. I like to make a constant, something like this and it works like a champ...

    Const NODBZ As Double = 0.000000001 ...

    X = Y / (Z + NODBZ)

    Then just round it when you are done.

    what if the denominator is -0.000000001

    captcha: uxor as in your code is the s-uxor

  • (cs) in reply to Eternal Density
    Eternal Density:
    I think the game is called something like TopCod3r Online. The one everyone is playing, not the one pictured. (The game pictured was obviously prepared for FILE_NOT_FOUND)
    I think I just lost The Game. :(
    A:
    I'm just surprised he got to page infinity. How long did that take him to get there?
    He probably just hit the Last Page link.

    BTW, the game screenshot is from EVE Online.

  • return of the spelling nazi (unregistered)

    TRWTF is the number of programmers who think that a number divided by zero yields infinity.

    Hint: it doesn't.

  • anon (unregistered) in reply to Foobar

    While he might be trolling, MATLAB has the "eps" function for this purpose. You simply divide by eps instead of 0.

    What's even better is that their software natively supports +/- Inf, so there is actually no clear reason in my mind to divide by eps (defined as "the smallest positive representable value", or, if you call eps(x), the minimum positive number such that x!=eps(x)+x for the floating point system.

    I have not found one good use for eps, but their library is riddled with these bizarre constructs.

  • java facist (unregistered) in reply to TopCod3r

    That's just the kind of insightful solution we expect from .Net

    You're not part of Microsoft's Excel development team are you?

  • more randomer than you (unregistered) in reply to A
    A:
    I'm just surprised he got to page infinity. How long did that take him to get there?

    A lot of email clients nowdays have a 'forward to last page' type functionality which will just flick through the pages one at a time (I think gmail can do more than one at a time if set up right) until it gets to the last page. I use it quite a lot when searching for an email which I know I received but can't remember when.

    The obvious downside here is that even if they set the page turn rate to something fast, say 5seconds per page for example, it would probably have taken at least 30-60mins for the OP's mail system to get to the Infinity page and in that length of time it is highly unlikely that they were able to see all of the emails on each page due to lapses in concentration.

  • Venik (unregistered) in reply to SS
    SS:
    I swear to God I'm going to pistol whip the next guy who says, "EVE Online."

    It's from EVAR Online!

  • Anonymous (unregistered)

    Well in high school many years ago, we had to do proofs and one of the proofs we had was that 0 = 1.

    I didn't say it was a good/true proof. :-D

  • tbrown (unregistered) in reply to Zap Brannigan
    Zap Brannigan :
    I know I'm replying to TopCod3r, but I have actually used this technique. If someone has a better solution, I'm listening.

    You think you're funny, but you're not!

  • tbrown (unregistered) in reply to Justar
    Justar:
    Can I have your stuff?

    Of course you meant to ask, "plz send me the c0dz"

  • tbrown (unregistered) in reply to JimM
    JimM:
    skoggkatt:
    DaveyDaveDave:
    Perhaps it didn't have an infinite number of $0 bills left, maybe someone had withdrawn one (or more) since it was refilled.
    infinite number minus one (or more) is still infinite number.
    Infinty - 1 may still be infinite, but it is less than Infinity. Discuss ;^)

    I'm a bit rusty on this and may be wrong, but I think INF-1 has the same cardinality as INF and, therefore, is not less.

  • tbrown (unregistered) in reply to A
    A:
    I'm just surprised he got to page infinity. How long did that take him to get there?

    2 seconds...

    The first page took 1 second to get to, but each page thereafter took only half as long as the previous page. :-)

  • mudkipz (unregistered) in reply to tbrown
    tbrown:
    A:
    I'm just surprised he got to page infinity. How long did that take him to get there?

    2 seconds...

    The first page took 1 second to get to, but each page thereafter took only half as long as the previous page. :-)

    I like it. The theory of real sequences/series certainly confirms that reasoning about this problem is consistent, but it is deeply unsatisfying as an explanation for how infinite processes can "finish" in a finite amount of time. After all, for every n in N, Sigma 2^{-n} is less than 1.

    Indeed, you truly need at least some ordinal analysis to make sense of the issue. The theory of sequences was the first step in that direction, essentially defining {x_i}'s limit in terms of interior operators (which are monotonic -- the point being, the definition of a limit of a sequence is transfinite definition.

    Which bares an extremely important point about infinity. There are at least two kinds of it. Order can be just as -- if not more -- important than "size" (cardinality). This is an interesting resolution to the original question, since it (alone) makes no metaphysical claim about the "size" of the process, just that a series converges because something (that is, the limit) "happens" after each element of the sequence. The quantifiers don't care that there are (potentially) infinitely many "events" before the limit.

  • methinks (unregistered) in reply to Omega Minus
    Omega Minus:
    Math Whore:

    This is an easy one. Infinity is not a number - it's a concept. Infinity-1 is not a valid equation and therefore does not result in a valid number. It would be akin to saying that orange-1 is less than orange - it just doesn't make sense.

    Orange - 1 is rag. Easy.

    Hehe, very well seen.

    We have a mobile phone provider here named "ONE" which was just bought by the much larger provider "Orange", and the ads preparing the customers for the brand change ran like this:

    "ONE is becoming more: ORANGE"

    (The letters in the word "ORANGE" were in fact coloured differently, white for O,N,E and of course orange for the rest, but you get the idea - it's the reverse operation of "Orange - 1 = rag": One + rag = Orange ;o)

  • FileNotFound (unregistered) in reply to PSWorx
    PSWorx:
    Jetts:
    Hey Farva, whats the name of that online game you like to play? You know the MMORPG with the space ships?

    Isn't it something like ADAM Online?

    Bioshock2 - Big daddys in outer space?

  • Letrange (unregistered) in reply to tbrown
    tbrown:
    Justar:
    Can I have your stuff?

    Of course you meant to ask, "plz send me the c0dz"

    Nope, he actually meant "Can I have your stuff?". EvE online's universe is meant to be dark and dangerous. As such it allows behavior that in most games would be considered griefing. The usual response from a newbie to such behavior is to post on the forums threatening to quit the game. "Can I have your stuff?" is the traditional response to said newbie. In context it would be considered a reply to the guy who threatened to pistol whip the next poster that said "EvE Online".

  • Joe Butler (unregistered) in reply to facilisi

    It's not a spam alert - it's about real 100 2.0485e+290lorious SPAM(tm)... I think.

  • Joe Butler (unregistered) in reply to facilisi
    facilisi:
    Hey Joe, I never get SPAM about my gay issues, so what kind of sites have you been visiting anyway?

    It's not a spam alert - it's about real 100 2.0485e+290lorious SPAM(tm)... I think.

  • Paolo G (unregistered) in reply to LightStyx

    Scottish comes under British, and has done for the last 350 years... Did you mean "English"?

  • Random832 (unregistered) in reply to SlyEcho
    SlyEcho:
    printf("I bet 90 33653337357f you won't get the spam WTF.");

    For those of you who didn't get it - in "100% growth" the "% g" is replaced with the next argument to printf (in this case, garbage, since there is no argument) formatted as a floating-point number in either plain decimal or scientific notation (whichever yields a shorter string). The space between % and g makes it print a space if the number is positive in order to take up the same width as the zero if it's negative.

  • Reply to TRWTF (unregistered) in reply to TopCod3r

    Wait what?

    I don't think you caught the fact that dividing anything by 0.000000001 turns it into a really big number completely unrelated to what we're doing....

    Essentially if you divide any number by x->0, you get infinity.

    How is that useful to an ATM?

    Hello, please withdraw infinite money....???

Leave a comment on “Unprepared For Divide_By_Zero”

Log In or post as a guest

Replying to comment #:

« Return to Article