12 Dec
2015
12 Dec
'15
1:01 a.m.
safe_integer_range<-100, 100> a, x, b, y; y = a * x + b;
Then it can be known at compile time that y can never overflow so no runtime checking is required.
This is the second time you've written something like this - in the PDF you said that squaring an int8_t didn't overflow. clearly it depends on the values of a,x,b which in general are only known at runtime.. So what do you mean there are no runtime checks?