http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47945
Summary: REAL(8) output conversion error on MinGW32 Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: thenl...@users.sourceforge.net The last digits of REAL(8) numbers are converted inaccurately on output. For instance, the output of: real(8) :: r8 real(16) :: r16 r8 = .14285714285714286d0 r16 = r8 write(*, '(f35.32)') r8 write(*, '(f35.32)') r16 end is: 0.14285714285714284921875000000000 0.14285714285714284921269268124888 but the expected output is: 0.14285714285714284921269268124888 0.14285714285714284921269268124888 because the internal 64-bit representation of .14285714285714286 is approximately equal to 0.14285714285714284921269268124888... Arguably, an output of 0.14285714285714285000000000000000 would equally be acceptable, because it is the shortest decimal representation of the same internal value. (This is in fact what the GCC C Compiler on mingw32 does)