A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/345673.html below:

working with VERY large 'float' and 'complex' types

working with VERY large 'float' and 'complex' types working with VERY large 'float' and 'complex' typesMikael Olofsson mikael at isy.liu.se
Thu Sep 15 04:53:27 EDT 2005
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

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4