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,...) |
|
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) |
|
#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 541 of file format.c.
static u8* add_some_zeros |
( |
u8 * |
s, |
|
|
uword |
n_zeros |
|
) |
| |
|
static |
static const u8* do_percent |
( |
u8 ** |
_s, |
|
|
const u8 * |
fmt, |
|
|
va_list * |
va |
|
) |
| |
|
static |
static f64 f64_precision |
( |
int |
base2_expon | ) |
|
|
static |
word fdformat |
( |
int |
fd, |
|
|
char * |
fmt, |
|
|
|
... |
|
) |
| |
word fformat |
( |
FILE * |
f, |
|
|
char * |
fmt, |
|
|
|
... |
|
) |
| |
u8* format |
( |
u8 * |
s, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
static u8 * format_float |
( |
u8 * |
s, |
|
|
f64 |
x, |
|
|
uword |
n_digits_to_print, |
|
|
uword |
output_style |
|
) |
| |
|
static |
static f64 normalize |
( |
f64 |
x, |
|
|
word * |
expon_return, |
|
|
f64 * |
prec_return |
|
) |
| |
|
static |
static f64 times_power_of_ten |
( |
f64 |
x, |
|
|
int |
n |
|
) |
| |
|
static |
word va_fformat |
( |
FILE * |
f, |
|
|
char * |
fmt, |
|
|
va_list * |
va |
|
) |
| |
u8* va_format |
( |
u8 * |
s, |
|
|
const char * |
fmt, |
|
|
va_list * |
va |
|
) |
| |