0

We all know, if we divide (1.0/0.0) we will get +Infinity and if we divide (-1.0/0.0) we will get -Infinity! I want to know How computers calculate this value, internally ??

PS: I wondering why I didn't find any question regarding this in any of StackExchange community!

Papai from BEKOAIL
  • 1,469
  • 1
  • 11
  • 17
  • 3
    Related question, with answer, here: https://stackoverflow.com/questions/14682005/why-does-division-by-zero-in-ieee754-standard-results-in-infinite-value – CoolBots Sep 05 '19 at 06:15
  • 1
    In IEEE 754, the results of the division you show will depend on the sign of the zero ! –  Sep 05 '19 at 13:28
  • @YvesDaoust This is an important detail to point out. Thank you. – Zéychin Sep 06 '19 at 15:18

1 Answers1

2

Short answer: It will detect that you divide by 0 and not do the actual division.

Long answer here: https://softwareengineering.stackexchange.com/questions/311155/will-a-computer-attempt-to-divide-by-zero

Lucas
  • 41
  • 6