Lines Matching refs:num
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…
383 static char *write_num(char *str, ul num, int base, int field_width, int precision, int flags) in write_num() argument
415 int64_t signed_num = (int64_t)num; in write_num()
419 num = -signed_num; in write_num()
422 num = signed_num; in write_num()
442 if (num == 0) in write_num()
446 num = ABS(num); in write_num()
448 while (num > 0) in write_num()
450 tmp_num[js_num++] = digits[num % base]; // 注意这里,输出的数字,是小端对齐的。低位存低位 in write_num()
451 num /= base; 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
515 if (flags & SIGN && num < 0) in write_float_point_num()
518 num = -num; in write_float_point_num()
531 uint64_t num_z = (uint64_t)(num); // 获取整数部分 in write_float_point_num()
532 uint64_t num_decimal = (uint64_t)(round(1.0 * (num - num_z) * pow(10, precision))); // 获取小数部分 in write_float_point_num()
534 if (num == 0 || num_z == 0) in write_float_point_num()