Lines Matching refs:precision
9 static char *write_num(char *str, uint64_t num, int base, int field_width, int precision, int flags…
10 static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags…
83 int precision; //精度 in vsprintf() local
167 precision = -1; in vsprintf()
173 precision = va_arg(args, int); in vsprintf()
178 precision = skip_and_atoi(&fmt); in vsprintf()
229 if (precision < 0) in vsprintf()
232 precision = len; in vsprintf()
235 else if (len > precision) in vsprintf()
237 len = precision; in vsprintf()
268 str = write_num(str, va_arg(args, long long), 8, field_width, precision, flags); in vsprintf()
270 str = write_num(str, va_arg(args, int), 8, field_width, precision, flags); in vsprintf()
281 … str = write_num(str, (unsigned long)va_arg(args, void *), 16, field_width, precision, flags); in vsprintf()
291 str = write_num(str, va_arg(args, int64_t), 16, field_width, precision, flags); in vsprintf()
293 str = write_num(str, va_arg(args, int), 16, field_width, precision, flags); in vsprintf()
302 str = write_num(str, va_arg(args, long long), 10, field_width, precision, flags); in vsprintf()
304 str = write_num(str, va_arg(args, int), 10, field_width, precision, flags); in vsprintf()
310 … str = write_num(str, va_arg(args, unsigned long long), 10, field_width, precision, flags); in vsprintf()
312 str = write_num(str, va_arg(args, unsigned int), 10, field_width, precision, flags); in vsprintf()
327 if (precision < 0) in vsprintf()
328 precision = 3; in vsprintf()
330 str = write_float_point_num(str, va_arg(args, double), field_width, precision, flags); in vsprintf()
350 static char *write_num(char *str, uint64_t num, int base, int field_width, int precision, int flags) in write_num() argument
422 if (js_num > precision) in write_num()
423 precision = js_num; in write_num()
425 field_width -= precision; in write_num()
445 while (js_num < precision) in write_num()
447 --precision; in write_num()
460 static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags) in write_float_point_num() argument
499 uint64_t num_decimal = (uint64_t)(round(1.0 * (num - num_z) * pow(10, precision))); // 获取小数部分 in write_float_point_num()
519 field_width -= (precision + 1 + js_num_z); in write_float_point_num()
541 for (int i = 0; i < precision && js_num_d-- > 0; ++i) in write_float_point_num()
544 while (total_dec_count < precision) in write_float_point_num()