On 4/23/2016 2:08 PM, Prathamesh Kulkarni wrote:
Please see: [1] https://gcc.gnu.org/bugs/#nonbugs
This is not about the original question, but I happened to give a look at the 50/49 result example (first non-bug example). The explanation is obviously correct about rounding of finite precision numbers, but I think it could more clearly say that it is the combined result of rounding of floating point operations and /truncation/ (as per C/C++ standard) of double to int conversion: if the (int) cast were not in place the result would always be 50 because the << operator on double would round the output to 50.
-- Manfred