Skip to content

Building digit by digit / base accumulation [mp]

Micro pattern

Description

Build a positional number by multiplying the accumulated result by its base and appending the next digit.

Problems

Decimal accumulation

Consume or produce decimal digits with positional multiplication or division.

Other bases

Apply positional accumulation in a nondecimal base.

Arithmetic output digits

Produce digits individually while carrying overflow to the next position.