compact string representations of complex and rational numbers