Lines Matching refs:num
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…
350 static char *write_num(char *str, uint64_t num, int base, int field_width, int precision, int flags) in write_num() argument
382 int64_t signed_num = (int64_t)num; in write_num()
386 num = -signed_num; in write_num()
389 num = signed_num; in write_num()
409 if (num == 0) in write_num()
413 num = llabs(num); in write_num()
415 while (num > 0) in write_num()
417 tmp_num[js_num++] = digits[num % base]; // 注意这里,输出的数字,是小端对齐的。低位存低位 in write_num()
418 num /= base; 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
482 if (flags & SIGN && num < 0) in write_float_point_num()
485 num = -num; in write_float_point_num()
498 uint64_t num_z = (uint64_t)(num); // 获取整数部分 in write_float_point_num()
499 uint64_t num_decimal = (uint64_t)(round(1.0 * (num - num_z) * pow(10, precision))); // 获取小数部分 in write_float_point_num()
501 if (num == 0 || num_z == 0) in write_float_point_num()