title: Fortran float changing value of integer
body: <p>I have noticed a bug in a code that I use, demonstrated by the following test code:</p>
  
  <pre><code>PROGRAM test
  
  implicit none
  
  
  integer(kind=8):: i
  
  i=17159401
  print*,i,float(i)
  
  
  end program test
  </code></pre>
  
  <p>The code outputs <code>17159401   17159400.0</code>, whereas it should output <code>17159401   17159401.0</code> </p>
  
  <p>I'm using gfortran:</p>
  
  <pre><code>Using built-in specs.
  COLLECT_GCC=gfortran
  COLLECT_LTO_WRAPPER=/apps/gcc/4.8.2/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper
  Target: x86_64-unknown-linux-gnu
  Configured with: ../gcc-4.8.2/configure --prefix=/cm/shared/apps/gcc/4.8.2 --enable-languages=c,c++,fortran --with-gmp-include=/root/rpmbuild/BUILD/gcc-4.8.2-obj/../gcc-4.8.2/our-gmp --with-gmp-lib=/root/rpmbuild/BUILD/gcc-4.8.2-obj/../gcc-4.8.2/our-gmp --with-mpc-include=/root/rpmbuild/BUILD/gcc-4.8.2-obj/../gcc-4.8.2/our-mpc/src --with-mpc-lib=/root/rpmbuild/BUILD/gcc-4.8.2-obj/../gcc-4.8.2/our-mpc/src/.libs --with-mpfr-include=/root/rpmbuild/BUILD/gcc-4.8.2-obj/../gcc-4.8.2/our-mpfr/src --with-mpfr-lib=/root/rpmbuild/BUILD/gcc-4.8.2-obj/../gcc-4.8.2/our-mpfr/src/.libs
  Thread model: posix
  gcc version 4.8.2 (GCC) 
  </code></pre>
  
  <p>Any ideas why this is happening?</p>