Computing Cartesian Products Using Mixed-Base Numbers
github.com