4 ms·
I believe this is the right answer: division by zero is dubious enough one wants to always special-case it; yes, sometimes 1/0=0 is the right answer but sometim
by DemocracyFTW2 2y ago
I believe this is the right answer: division by zero is dubious enough one wants to always special-case it; yes, sometimes 1/0=0 is the right answer but sometimes 1/9=∞ is better, or just display a blank indicating "N/A". You want an exception or, better still, a compiler that forces you to declare what to do each time 1/0 becomes possible in your code.