1/2 with integers always has been 0 since the beginning of computers. That is the way it's implemented in the hardware and there is also a variant for floating point calculation. And throwing a warning will not help. What would that warning be: Warning you're using integer to calculate stuff
Luigi Plinge wrote: the whole of mathematics since the dawn of civilization, 1/2 has always been... well, 1/2, not 0.
ummm...I'm not sure you know your math history. The concept of fractions is a relatively new concept, as compared to some others. Think about it...when you were first learning how do divide, did you say that 7 / 3 = 2.333333...., or did you say it was 2 with a remainder of 1?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors