Upgrade big decimal to do powers and add the functions needed to make it usable as a key for a dict / set
Dumb, brute force solution to problem 29. Doesn't scale. Will revisit.