2 ms·
FWIW, division by zero already does the same thing.
by gpderetta 6y ago
FWIW, division by zero already does the same thing.
- asveikau 6y agoAnd that's one reason that when I write code that divides and it's not known ahead of time, I usually check the denominator for zero. Doing that for every mathematical operation would not be feasible. Edit: hello good sir or madam downvoter, can someone explain why this is a controversial opinion? In languages where this error does not throw exceptions and in problem domains where the process really needs to stay up, reasonable caution would often mean you might manually check possible denominators for zero.