Skip to content

backtracking alternative #74

@ethers

Description

@ethers

1 idea is to use "roundness"

the "roundness" of a number is the largest power of 2 such that B % roundness = 0
6 has roundness 2
96 has roundness 32
basically it's the largest power of 2 that divides it

lets say you want to go from 117 to 1
you'd go 117[1] 116[4] 112[16] 96[32] 64...... 64 is special because it can't go 'up' any further, so maybe 64 just goes back half way to 32

for power of 2 one idea is go back halfway
if need to go up again, say we want 50, just restart back at 64 and backtrack one

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions