strtod sometimes returns positive zero on underflow when it should return negative zero. Testcase: #include <stdio.h> #include <stdlib.h> int main (void) { printf ("%a\n", atof ("-0x0.7p-1074")); return 0; } Testing a patch.
Fixed for 2.17 by: commit 7efb4737dd729326e5339facbd785cee43fb53b3 Author: Joseph Myers <joseph@codesourcery.com> Date: Mon Aug 27 16:04:19 2012 +0000 Fix sign of zero on strtod underflow (bug 14519).