title: Precision problems of real numbers in Fortran
body: <p>I've been trying to use Fortran for my research project, with the GNU Fortran compiler (gfortran), latest version, 
  but I've been encountering some problems in the way it processes real numbers. If you have for example the code:</p>
  
  <pre><code>program test
  implicit none
  
  real :: y = 23.234, z
  
  z = y * 100000
  write(*,*) y, z
  
  end program
  </code></pre>
  
  <p>You'll get as output: </p>
  
  <pre><code>23.23999    2323400.0 
  </code></pre>
  
  <p>I find this really strange.
  Can someone tell me what's exactly happening here? Looking at z I can see that y does retain its precision, so for calculations that shouldn't be a problem I suppose. But why is the output of y not exactly the same as the value that I've specified, and what can I do to make it exactly the same? </p>