https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61319
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> --- http://stackoverflow.com/questions/8817164/signed-nan-values If the sign bit in the underlying representation is set, this particular implementation of printf prints -nan. There is no standard that says that it has to, or that it shouldn't.