I am looking to implement a general base conversion algorithm. I was wondering if there already exists such a thing, since I couldn't find one.
Currently, I am able to go from int to int, but I also want support for negative, rational and, in principle, all complex numbers as both bases and the value to convert.
Does this already exists and if not, how would one do make this without considering each case individually (int->int, int->float, int->complex etc).