Function core::fmt::num::fmt_u128

source ·
fn fmt_u128(n: u128, is_nonnegative: bool, f: &mut Formatter<'_>) -> Result
Expand description

Specialized optimization for u128. Instead of taking two items at a time, it splits into at most 2 u64s, and then chunks by 10e16, 10e8, 10e4, 10e2, and then 10e1. It also has to handle 1 last item, as 10^40 > 2^128 > 10^39, whereas 10^20 > 2^64 > 10^19.