bit.print_dec_uintΒΆ

prints x[:n] as an unsigned decimal number (without leading zeros).

The number 28/93 is the ratio of the number of decimal digits and the number of binary digits.
It’s bigger than log(2)/log(10) by 0.015%, which is just enough.

SignatureΒΆ

def print_dec_uint n, x @ start_printing, xor, end_xor, dst, src, print_buffer, print_buffer_flag, div10, zero_flag, ret_reg, end { ... }

Defined in bit/output.fj β€” lines 150–189 (view on GitHub).

ComplexityΒΆ

  • Time: n^2(2@+4)  // actually: nd(7@+12)  (for d number of decimal digits)

  • Space: n(14@+16)

See the complexity glossary for what @, w, dw, dbit, n mean.

SourceΒΆ

Depends onΒΆ

Used byΒΆ

Example usesΒΆ


← Previous: bit.print_hex_int Next: bit.print_dec_uint.div10_step β†’