http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60128
--- Comment #15 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- What is the output of write(*,"(en15.1)") 9.49999905 end ? If it is 9.4, it means that your snprintf is not rounding to nearest but to zero.