Add support for hexadecimal and exponent numbers.