fract = (10 * fract + 512) / 1024;
/* if the result would be >= 10, round main number */
if (fract == 10) {
if (fract >= 10) {
if (number >= 0)
number++;
else
number--;
fract = 0;
}
} else if (fract < 0)
fract = 0; /* shouldn't happen */
if (number == 0)
strlcpy(result, "0B", FMT_SCALED_STRSIZE);