Fix nan output in the printf family.

Bug: https://code.google.com/p/android/issues/detail?id=82452
Change-Id: I51f226c8b033de6e81baeea5e6db3de6ed196f73
Merge "Fix nan output in the printf family."