[Python-ideas] Python3.3 Decimal Library Released

David Mertz mertz at gnosis.cx
Mon Mar 3 23:47:06 CET 2014


On Mon, Mar 3, 2014 at 2:32 PM, Mark H. Harris <harrismh777 at gmail.com>wrote:

> Business apps require precision (banking, sales, marketing, finance,
> & on and on).
>

I definitely agree the decimal numbers are much better for financial data
than binary floating point.  That's certainly a very legitimate domain.  On
the other hand, there are a great many other domains that are very
different from this--i.e. scientific areas.  For this, decimal is no
better, and in many cases worse.  At the very least, throwing in a 2x+
slowdown of calculations is notably worse for scientific computing.

In other words, I'm glad we have decimals in Python now.  I'd be more glad
if they were expressed more easily (e.g. as literals), but for more domains
than not, for backward and cross-language compatibility, and for speed,
binary floating point remains better.


> One big issue that is going to confront everyone sooner than later is
> cryptography. Fast bignum support, fast factoring, and fast
> transcendentals are going to become more important as firms and
> individuals move into their own on crypto; not too far fetched, really.
>

Sounds far fetched to me to imagine that amateur cryptography will ever be
of value over well-audited, well studied, crypto-analyzed techniques.

But bracketing that, exceedingly few cryptographic techniques are likely to
use either binary or decimal floating point operations.  This is strictly
the domain of integer math, so mentioning it seems like random hand waving
unrelated to the topic of default or convenient representation of
fractional numeric data.

Yours, David...

-- 
Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons.  Intellectual property is
to the 21st century what the slave trade was to the 16th.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140303/ea51db41/attachment.html>


More information about the Python-ideas mailing list