Lines Matching refs:precision

25 static char *write_num(char *str, ul num, int base, int field_width, int precision, int flags);
27 static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags…
66 int precision; //精度 in __do_vsprintf() local
154 precision = -1; in __do_vsprintf()
160 precision = va_arg(args, int); in __do_vsprintf()
165 precision = skip_and_atoi(&fmt); in __do_vsprintf()
216 if (precision < 0) in __do_vsprintf()
219 precision = len; in __do_vsprintf()
222 else if (len > precision) in __do_vsprintf()
224 len = precision; in __do_vsprintf()
255 str = write_num(str, va_arg(args, long long), 8, field_width, precision, flags); in __do_vsprintf()
257 str = write_num(str, va_arg(args, int), 8, field_width, precision, flags); in __do_vsprintf()
268 … str = write_num(str, (unsigned long)va_arg(args, void *), 16, field_width, precision, flags); in __do_vsprintf()
278 str = write_num(str, va_arg(args, ll), 16, field_width, precision, flags); in __do_vsprintf()
280 str = write_num(str, va_arg(args, int), 16, field_width, precision, flags); in __do_vsprintf()
289 str = write_num(str, va_arg(args, long long), 10, field_width, precision, flags); in __do_vsprintf()
291 str = write_num(str, va_arg(args, int), 10, field_width, precision, flags); in __do_vsprintf()
297 … str = write_num(str, va_arg(args, unsigned long long), 10, field_width, precision, flags); in __do_vsprintf()
299 str = write_num(str, va_arg(args, unsigned int), 10, field_width, precision, flags); in __do_vsprintf()
318 if (precision < 0) in __do_vsprintf()
319 precision = 3; in __do_vsprintf()
321 str = write_float_point_num(str, va_arg(args, double), field_width, precision, flags); in __do_vsprintf()
383 static char *write_num(char *str, ul num, int base, int field_width, int precision, int flags) in write_num() argument
455 if (js_num > precision) in write_num()
456 precision = js_num; in write_num()
458 field_width -= precision; in write_num()
478 while (js_num < precision) in write_num()
480 --precision; in write_num()
493 static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags) in write_float_point_num() argument
532 uint64_t num_decimal = (uint64_t)(round(1.0 * (num - num_z) * pow(10, precision))); // 获取小数部分 in write_float_point_num()
552 field_width -= (precision + 1 + js_num_z); in write_float_point_num()
572 for (int i = 0; i < precision && js_num_d-- > 0; ++i) in write_float_point_num()
575 while (total_dec_count < precision) in write_float_point_num()