Convert a number to a literal representation