>number = sprintf(format, "%031.15f", atof(buffer));
Change it to
Code:
number = sprintf(format, "%.15f", atof(buffer));
If you omit any formatting for the whole number, a single 0 is printed if there is none and the whole number is printed with no leading zeros if there is.