News for hackers. Stuff that matters.
Re:How expensive is integer-overflow trapping in C++? by asveikau on Thursday September 24, 2020 @10:12AM (#24578772)
And 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.

There are no comments on this comment yet.