extend methods of decimal module
Mark H. Harris
harrismh777 at gmail.com
Fri Feb 28 19:34:32 CET 2014
On Friday, February 28, 2014 9:11:49 AM UTC-6, Steven D'Aprano wrote:
> >> Now that Python has a fast C implementation of Decimal, I would be
> >> happy for Python 4000 to default to decimal floats, and require special
> >> syntax for binary floats. Say, 0.1b if you want a binary float, and 0.1
> >> for a decimal.
Yes. ... and for clarification back to one of my previous comments, when I refer to 'float' I am speaking of the IEEE binary floating point representation built-in everywhere... including the processor! ... not the concept of tracking a floating point, say in decimal for instance.
Isn't it amazing... the IEEE binary float or double is so entrenched (including the processor) that even though it has inherent problems... we are kinda stuck with it for a while.
I have been thinking that we need extended instructions in the processor (similar to MMX) to handle accelerating decimal float floating point arithmetic, as in the decimal module. Back in the day when memory was expensive binary floats made sense... but today there is no reason to continue to stick with that limitation.
And on the other hand, think of all the amazing things folks have done with floats and doubles... all these years.
More information about the Python-list