I have problem on UNIX based systems sprintf does not round up properly value.
For example
double tmp = 88888888888885.875 char out[512];
That's because you're using double which has accuracy limitations, meaning, your 88888888888885.875 is probably being rounded to something else internally.
double
88888888888885.875
See more info in a similar question, in blogs or in wikipedia.