int format_float(float f, char *buf, size_t bufSize, char fmt, int prec, char sign);