Paul Rubin calculates exp(1000.0):
> You could rearrange your formulas to not need such big numbers:
> 
>     x = 1000.
>     log10_z = x / math.log(10)
>     c,m = divmod(log10_z, 1.)
>     print 'z = %.5fE%d' % (10.**c, m)

Nice approach. We should never forget that we do have mathematical 
skills beside the computers. But, shouldn't you switch c and m in the 
last row?

/MiO
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to