Skip to main content

Module float

Module float 

Source

Constants§

FMT_MAX_EXP_PRECISION
FMT_MAX_PRECISION
Rust’s format!("{:.*}", n, x) panics when n exceeds the fmt runtime’s internal precision limit. User-supplied precision can legally reach far higher values (e.g. f"{1.5:.1000000}") — clamp here so we produce a (truncated-but-valid) output instead of aborting the interpreter. Harmless in practice: f64 carries only ~17 significant digits, so precision beyond 65K is padding zeros at best.

Functions§

clamp_exp_precision
clamp_fmt_precision
decimal_point_or_empty
format_exponent
format_fixed
format_general
from_hex
is_integer
parse_bytes
parse_str
to_hex
to_string