64.07 * 100 is a double multiplied by an integer. Never a good idea to mix floating point with integers but in this case the 100 is converted to double and the result is double.
Now you have (int)(64.07 * 100 ) which tells the compiler to treat the double as an int. Even though the bit layout of the double is not the bit layout of an int. That cast does not convert the double to an int. All it does is tell the compiler to not be putting out warnings because you know more about what you are doing then the compiler does.
You can't really convert a float to an integer since the integer has no decimal portion making any conversion inaccurate.
Unless you have a really good reason for using floating point you should stick with integers.
Comment