Lines Matching refs:precision

10 static char *write_num(char *str, uint64_t num, int base, int field_width, int precision, int flags…
11 static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags…
85 int precision; // 精度 in vsprintf() local
169 precision = -1; in vsprintf()
175 precision = va_arg(args, int); in vsprintf()
180 precision = skip_and_atoi(&fmt); in vsprintf()
231 if (precision < 0) in vsprintf()
234 precision = len; in vsprintf()
237 else if (len > precision) in vsprintf()
239 len = precision; in vsprintf()
270 str = write_num(str, va_arg(args, long long), 8, field_width, precision, flags); in vsprintf()
272 str = write_num(str, va_arg(args, int), 8, field_width, precision, flags); in vsprintf()
283 … str = write_num(str, (unsigned long)va_arg(args, void *), 16, field_width, precision, flags); in vsprintf()
293 str = write_num(str, va_arg(args, int64_t), 16, field_width, precision, flags); in vsprintf()
295 str = write_num(str, va_arg(args, int), 16, field_width, precision, flags); in vsprintf()
304 str = write_num(str, va_arg(args, long long), 10, field_width, precision, flags); in vsprintf()
306 str = write_num(str, va_arg(args, int), 10, field_width, precision, flags); in vsprintf()
312 … str = write_num(str, va_arg(args, unsigned long long), 10, field_width, precision, flags); in vsprintf()
314 str = write_num(str, va_arg(args, unsigned int), 10, field_width, precision, flags); in vsprintf()
329 if (precision < 0) in vsprintf()
330 precision = 3; in vsprintf()
332 str = write_float_point_num(str, va_arg(args, double), field_width, precision, flags); in vsprintf()
352 static char *write_num(char *str, uint64_t num, int base, int field_width, int precision, int flags) in write_num() argument
424 if (js_num > precision) in write_num()
425 precision = js_num; in write_num()
427 field_width -= precision; in write_num()
447 while (js_num < precision) in write_num()
449 --precision; in write_num()
462 static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags) in write_float_point_num() argument
501 uint64_t num_decimal = (uint64_t)(round(1.0 * (num - num_z) * pow(10, precision))); // 获取小数部分 in write_float_point_num()
521 field_width -= (precision + 1 + js_num_z); in write_float_point_num()
543 for (int i = 0; i < precision && js_num_d-- > 0; ++i) in write_float_point_num()
546 while (total_dec_count < precision) in write_float_point_num()