Lines Matching refs:num
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…
352 static char *write_num(char *str, uint64_t num, int base, int field_width, int precision, int flags) in write_num() argument
384 int64_t signed_num = (int64_t)num; in write_num()
388 num = -signed_num; in write_num()
391 num = signed_num; in write_num()
411 if (num == 0) in write_num()
415 num = llabs(num); in write_num()
417 while (num > 0) in write_num()
419 tmp_num[js_num++] = digits[num % base]; // 注意这里,输出的数字,是小端对齐的。低位存低位 in write_num()
420 num /= base; 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
484 if (flags & SIGN && num < 0) in write_float_point_num()
487 num = -num; in write_float_point_num()
500 uint64_t num_z = (uint64_t)(num); // 获取整数部分 in write_float_point_num()
501 uint64_t num_decimal = (uint64_t)(round(1.0 * (num - num_z) * pow(10, precision))); // 获取小数部分 in write_float_point_num()
503 if (num == 0 || num_z == 0) in write_float_point_num()