Wait what? float f = (short) 0.50 f; The result is 0.0 So..... float 0.50 gets casted to short so we cut the fractional part and get 0, and then cast it again to float and get 0.0?? that is crazy