+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: What would (seriously) happen if...

  1. #1
    Wire Sofaking kymagic's Avatar
    Join Date
    Jul 2007
    Location
    Bedford, UK
    Posts
    495

    Default



    Seriously - If I were to get a computer which had absolutely NO error handling whatsoever, and I told it to divide by zero, what would happen?
    Common sense no longer applies.

  2. #2
    That furred thing Black Phoenix's Avatar
    Join Date
    Feb 2007
    Location
    Kyiv, Ukraine
    Posts
    3,565

    Default

    It would freeze.
    Or it would just continue execution as ever never happened (and result value would be completly random).
    I'm a wire-crazy person with a tail.

    Take a daily journey into my brain

    D2K5

  3. #3
    Wirererer Kyzer's Avatar
    Join Date
    May 2007
    Location
    France
    Posts
    388

    Default

    Seriously,


  4. #4
    Wirererer undead82004's Avatar
    Join Date
    May 2007
    Location
    Fort Worth, Texas
    Posts
    320

    Default

    It would freeze.
    Or it would just continue execution as ever never happened (and result value would be completly random).[/b]
    lets say u divided 10 by 0. to me the answer is 0 or 10. 0 cuz u dont give anything out and 10 cuz u still hav 10 left wen u give nothing out. if those pics are real then its time i stop using vs
    You put the plug in the socket.
    ive got 2 tickets to paradise..in my pants.

  5. #5
    Wirererer Infinity's Avatar
    Join Date
    Mar 2007
    Posts
    274

    Default

    According to Microsoft, you can't. XD
    Many aspects of Garry's Mod are hardly the pinnical of realisim.

  6. #6
    That furred thing Black Phoenix's Avatar
    Join Date
    Feb 2007
    Location
    Kyiv, Ukraine
    Posts
    3,565

    Default

    lets say u divided 10 by 0. to me the answer is 0 or 10. 0 cuz u dont give anything out and 10 cuz u still hav 10 left wen u give nothing out. if those pics are real then its time i stop using vs[/b]
    Um, are you crazy or something.
    X / 0 = +Infinity or -Infinity, and because of fact that Real number division cant have 2 results, in real number space there is no result for X/0
    I'm a wire-crazy person with a tail.

    Take a daily journey into my brain

    D2K5

  7. #7
    Wirererer Infinity's Avatar
    Join Date
    Mar 2007
    Posts
    274

    Default

    X / 0 = +Infinity or -Infinity, and because of fact that Real number division cant have 2 results, in real number space there is no result for X/0[/b]
    (Double Shoop!)
    Many aspects of Garry's Mod are hardly the pinnical of realisim.

  8. #8
    Super Moderator Erkle's Avatar
    Join Date
    Feb 2007
    Location
    New Zealand
    Posts
    402

    Default

    Um, are you crazy or something.
    X / 0 = +Infinity or -Infinity, and because of fact that Real number division cant have 2 results, in real number space there is no result for X/0[/b]
    Um, are you crazy or something. +X/0 = +infinity, -X/0 = -infinity, 0/0 is undefined. There's nothing wrong with 2 results for computers because they can either return both or more commonly return a preselected one of the results. Computers simply don't usually have a representation of infinity, so there return an error instead. Some languages have special constructs to allow infinity to be returned but then there isn't much you can do with the result that's worth while.

    Without error checks it would simply not know what to return. A fully functional language would get stuck in an infinite loop and run out of memory.

    Edit: If two results was a problem then sqrt wouldn't work either.
    If in doubt, stick your finger in it.

  9. #9
    Wire Sofaking -orb-'s Avatar
    Join Date
    Apr 2007
    Location
    Boston at school, Maryland at home
    Posts
    402

    Default

    Erkle saves the day for great justice!
    Check out my wire mod tutorials at THIS LINK

  10. #10
    That furred thing Black Phoenix's Avatar
    Join Date
    Feb 2007
    Location
    Kyiv, Ukraine
    Posts
    3,565

    Default

    Um, are you crazy or something. +X/0 = +infinity, -X/0 = -infinity, 0/0 is undefined. There's nothing wrong with 2 results for computers because they can either return both or more commonly return a preselected one of the results. Computers simply don't usually have a representation of infinity, so there return an error instead. Some languages have special constructs to allow infinity to be returned but then there isn't much you can do with the result that's worth while.

    Without error checks it would simply not know what to return. A fully functional language would get stuck in an infinite loop and run out of memory.

    Edit: If two results was a problem then sqrt wouldn't work either.[/b]
    Read me again, I said "It has no result", aka its undefined.
    Also computers have representation for NaN and INF (not a number and infinity), and they use it (for floating point). I think IND is present too, but now always.
    I'm a wire-crazy person with a tail.

    Take a daily journey into my brain

    D2K5

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. ever had this happen to u?
    By undead82004 in forum Off-Topic
    Replies: 1
    Last Post: 11-17-2007, 11:46 PM
  2. OMG! what happen to my tools
    By GhostBuster in forum Installation and Malfunctions Support
    Replies: 4
    Last Post: 10-11-2007, 07:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots