How do programmers deal with infinities?

9 Answers

Relevance
  • 5 days ago

    Programmers cope with infinities via devising proper data exams and employing blunders checking and catching mechanism

    wrong places in the code.

    Very often the mathematical expressions examine to infinity (tremendous or poor) because of wrong user input. We catch the mistake to make certain the machine doesn’t break and let the person recognize what went incorrect. they could fix the mistake and strive again.

    In a few instances, infinities can arise because of numerical imprecisions of pc’s manner of storing numbers. again, make sure the device doesn’t crash, write a thorough error record and permit customers know what it’s not their fault and whom they want to touch.

    there is an alternative way of dealing with disasters in numerical computation. a few languages allow operator overloading. If an operation fails, it’s viable to go back a unique item as a way to represent a failure, even as still assisting mathematical operations on itself. in that case, the mistake propagates to the stop of the calculation, and the device affords the customers with a message signaling a hassle all through the assessment.

    • Login to reply the answers
  • Dont need to work with infinity.

    • Login to reply the answers
  • Chris
    Lv 7
    7 days ago

    I just take the number of absolutely dumbass questions on yahoo answers, that's so close to infinity it doesn't make a real difference.

    • Login to reply the answers
  • 1 week ago

    It is a while that in,they make you amused and then you are turned to a limited user really!

    • Login to reply the answers
  • How do you think about the answers? You can sign in to vote the answer.
  • Anonymous
    1 week ago

    They just do what programmers do. Bang their head against the wall and buy more monster.

    • Login to reply the answers
  • 1 week ago

    Usually they don't; but it depends on what they're doing; and also on what you mean by "infinities".  The IEEE 754 standard that most computers use for floating point arithmetic has representations for both + and - infinity, for example.  However, the most common use of them is to signal an "overflow": a situation where the result of a calculation is a number, but the magnitude is too large for the computer representation. That's not really "infinity" to most people.

    A "do while (true)" loop is described as an "infinite loop", but nobody has enough time to wait and see if a program is actually going to run that long.  :^P

    Someone working on a symbolic math application will probably deal with it as an object representing the symbol and the properties of the value that symbol represents.  This probably the most common way to "deal with" infinity when that's required in an application.  It's an abstraction with some properties that a program can use. 

    • ...Show all comments
    • husoski
      Lv 7
      1 week agoReport

      Thanks for the kind words, Snezzy.  It's not all that much effort, though, 'cept the typing.  I'd worked or played with most of that and still play around with bits in retirement.

    • Login to reply the answers
  • 1 week ago

    Divide by zero.

    • Login to reply the answers
  • 1 week ago

    No solution, that's beyond their capabilities.

    • Login to reply the answers
  • Tasm
    Lv 6
    1 week ago

    They don't need to work with infinity.

    • Login to reply the answers
Still have questions? Get your answers by asking now.