base_convert.py: added handling of exponents