while
76.999999999999 9 shown with no decimal places is rounded to 77
This is the same as in C, C++, Java, Fortran, Basic, etc. etc. etc.
Basically, there is no way to EXACTLY store a repeating decimal in 32
bits. Floating numbers (decimal points) are approximations. The casting
with (int) truncates this approximation.
Comment