Well, strictly speaking, 0 is an integer, so float num = 0 requires a casting from integer to float. But I suppose the compiler does this for you anyway. I guess people use 0.0f in order to emphasize that this is a float, so nobody mistakes it for an integer.