Is there a way to get python to print extremely large longs in scientific notation? I am talking about numbers on the order of 10^1000 or larger, at this size the standard print "%e" % num fails.
For example:
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print "%e" % 10**100 1.000000e+100 >>> print "%e" % 10**1000 Traceback (most recent call last): File "", line 1, in TypeError: float argument required, not long
It appears that python is trying to convert the long to a float and then print it, is it possible to get python to just print the long in scientific notation without converting it to a float?