3 ms·
True but do you care for all sums/muls in your code? Might be better to check where exactly can you have the overflows and test in the code for those cases. I
by raverbashing 6y ago
True but do you care for all sums/muls in your code?
Might be better to check where exactly can you have the overflows and test in the code for those cases. I think checking for overflows over the entire code is useful for testing/validation purposes but not really useful in production.
Or use bigger data types if you're hitting overflows frequently.
- chrisseaton 6y ago> Might be better to check where exactly can you have the overflows and test in the code for those cases. Compilers already track possible ranges and do this.