Scientific Notation

Fredrik Lundh fredrik at pythonware.com
Sun Dec 4 06:27:39 EST 2005


> > > You mean something like:
> > >
> > > >>> print '%e' % (1e50)
> > > 1.000000e+50
> > >
> > > ...?
>
> > No, I mean given a big number, such as
> > 1000000000000000000000000000000000000000000000000000, convert it into
> > scientific notation.
>
> It's the same.
>
> >>> print "%e" % 1000000000000000000000000000000000000000000000000000
> 1.000000e+51

one would have assumed that someone who *prefers* to use scientific notation
for large numbers would in fact know that, but the usenet never ceases to sur-
prise me...

</F>






More information about the Python-list mailing list