[Python-ideas] Python Float Update
random832 at fastmail.us
random832 at fastmail.us
Mon Jun 1 18:43:43 CEST 2015
On Mon, Jun 1, 2015, at 10:58, Steven D'Aprano wrote:
> I wish this myth about Decimals would die, because it isn't true. The
> only advantage of base-10 floats over base-2 floats -- and I'll admit it
> can be a big advantage -- is that many of the numbers we commonly care
> about can be represented in Decimal exactly, but not as base-2 floats.
> In every other way, Decimals are no more user friendly, understandable,
> or unsurprising than floats. Decimals violate all the same rules of
> arithmetic that floats do.
But people have been learning about those rules, as apply to decimals,
since they were small children. They know intuitively that 2/3 rounds to
...6667 at some point because they've done exactly that by hand. "user
friendly" and "understandable to beginners" don't arise in a vacuum.
More information about the Python-ideas
mailing list