164 karma · joined May 5, 2016 (10y ago) · 14 submissions
comment 7y ago · link · parent
comment 10y ago · link · parent
comment 10y ago · link · parent
initial: (106 * 17) / 17 = 10 (overflow) / 17 = 0
optimized: 106 * (17 / 17) = 106 * 1 = 106
So in this case the optimized version gives the expected result - it's still different than the initial expression, so it falls under the "undefined overflow" optimizations category.
comment 10y ago · link · parent
comment 10y ago · link · parent
comment 10y ago · link · parent
comment 10y ago · link · parent