Working with numbers in arbitrary bases