title: incorrect value after casting double to a float
body: <p>I have some C code performing high precision arithmetic compiled by gcc(gcc (GCC) 4.4.4 20100726 (Red Hat 4.4.4-13)).The final result of the calculation is a double which has a value of 622.07999995861189.I am casting the double to a float.</p>
  
  <p>frequency_value = (float)current_freq;</p>
  
  <p>where current_freq is a double and frequency_value is a float.The value of frequency_value after the cast is 622.080017.I would expect the value to be 622.079956 as calculated in gdb by</p>
  
  <p>(gdb) p (float)current_freq
  $1 = 622.079956</p>
  
  <p>Can anyone explain the large difference in values between that calculated by gcc and gdb.</p>