# severe beating of divide by zero

• 10-18-2002
muttski
severe beating of divide by zero
SO like, whenever a divide by zero is encountered it is caught by the cpu and the program dies, right???

what would happen if I hooked that interrupt so that no stupid kill-my-program routine would happen? What would the result of the divide be?
• 10-27-2002
sean
Well your question isn't very clear. First of all, the result would be infinity, or UNDEFINED, so there's no way to tell the interrupt to do this, unless you do a bit of processing yourself. Check to see if the denominator is 0, if it is, just send back however you want to write infinity, and don't call the interrupt. If it isn't 0, no problem.
• 10-27-2002
Cgawd
anything divided by 0 is not infinity, you can either call it undefined or no result, per math laws, deviding by 0 is impossible
• 10-30-2002
Waldo2k2
I wonder how computer gurus back in the day first discovered that dividing by 0 was a no-no?
(flashback to tech guys running around with fire hoses trying to cool down their processors which are caught in infinite loops of death)
• 11-21-2002
Esparno
Couldnt they have just used 'Ctrl + Alt + Pull power cord' :?
• 11-21-2002
moi
Quote:

Originally posted by Waldo2k2
I wonder how computer gurus back in the day first discovered that dividing by 0 was a no-no?
(flashback to tech guys running around with fire hoses trying to cool down their processors which are caught in infinite loops of death)

ummmmm, they knew that dividing by zero was no good when they took 5th grade math.
• 11-22-2002
Waldo2k2