Go to the source code of this file.
|
#define | f64_down(f, sign, expon, fraction) |
|
|
static u8 * | format_integer (u8 *s, u64 number, format_integer_options_t *options) |
|
static u8 * | format_float (u8 *s, f64 x, uword n_digits_to_print, uword output_style) |
|
static u8 * | justify (u8 *s, format_info_t *fi, uword s_len_orig) |
|
static const u8 * | do_percent (u8 **_s, const u8 *fmt, va_list *va) |
|
u8 * | va_format (u8 *s, const char *fmt, va_list *va) |
|
u8 * | format (u8 *s, const char *fmt,...) |
|
word | va_fformat (FILE *f, char *fmt, va_list *va) |
|
word | fformat (FILE *f, char *fmt,...) |
|
void | fformat_append_cr (FILE *ofp, const char *fmt,...) |
|
word | fdformat (int fd, char *fmt,...) |
|
static f64 | f64_up (uword sign, word expon, u64 fraction) |
|
static f64 | f64_precision (int base2_expon) |
|
static f64 | times_power_of_ten (f64 x, int n) |
|
static f64 | normalize (f64 x, word *expon_return, f64 *prec_return) |
|
static u8 * | add_some_zeros (u8 *s, uword n_zeros) |
|
◆ f64_down
#define f64_down |
( |
|
f, |
|
|
|
sign, |
|
|
|
expon, |
|
|
|
fraction |
|
) |
| |
Value:do { \
union {
u64 u;
f64 f; } _f64_down_tmp; \
_f64_down_tmp.f = (f); \
(sign) = (_f64_down_tmp.u >> 63); \
(expon) = ((_f64_down_tmp.u >> 52) & 0x7ff) - 1023; \
(fraction) = ((_f64_down_tmp.u << 12) >> 12) | ((
u64) 1 << 52); \
} while (0)
Definition at line 561 of file format.c.
◆ add_some_zeros()
static u8* add_some_zeros |
( |
u8 * |
s, |
|
|
uword |
n_zeros |
|
) |
| |
|
static |
◆ do_percent()
static const u8* do_percent |
( |
u8 ** |
_s, |
|
|
const u8 * |
fmt, |
|
|
va_list * |
va |
|
) |
| |
|
static |
◆ f64_precision()
static f64 f64_precision |
( |
int |
base2_expon | ) |
|
|
static |
◆ f64_up()
◆ fdformat()
word fdformat |
( |
int |
fd, |
|
|
char * |
fmt, |
|
|
|
... |
|
) |
| |
◆ fformat()
word fformat |
( |
FILE * |
f, |
|
|
char * |
fmt, |
|
|
|
... |
|
) |
| |
◆ fformat_append_cr()
void fformat_append_cr |
( |
FILE * |
ofp, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
◆ format()
u8* format |
( |
u8 * |
s, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
◆ format_float()
static u8 * format_float |
( |
u8 * |
s, |
|
|
f64 |
x, |
|
|
uword |
n_digits_to_print, |
|
|
uword |
output_style |
|
) |
| |
|
static |
◆ format_integer()
◆ justify()
◆ normalize()
static f64 normalize |
( |
f64 |
x, |
|
|
word * |
expon_return, |
|
|
f64 * |
prec_return |
|
) |
| |
|
static |
◆ times_power_of_ten()
static f64 times_power_of_ten |
( |
f64 |
x, |
|
|
int |
n |
|
) |
| |
|
static |
◆ va_fformat()
word va_fformat |
( |
FILE * |
f, |
|
|
char * |
fmt, |
|
|
va_list * |
va |
|
) |
| |
◆ va_format()
u8* va_format |
( |
u8 * |
s, |
|
|
const char * |
fmt, |
|
|
va_list * |
va |
|
) |
| |