Implement a numerically stable number parser