Partitioning decimal numbers