[Python-ideas] Python Numbers as Human Concept Decimal System
Chris Kaynor
ckaynor at zindagigames.com
Fri Mar 7 23:33:18 CET 2014
On Fri, Mar 7, 2014 at 1:24 PM, Andrew Barnert <abarnert at yahoo.com> wrote:
> There is no such thing as copying a binary float exactly into a decimal
> float. Decimal float values are not a superset of binary float values; in
> either direction, you have to round. Which is what Python 2.7+ does.
Presuming enough digits of precision, every binary float could be
represented precisely in decimal. Decimal is base 10, which factors to 2
and 5, meaning all powers of 1/2 and 1/5 can be precisely represented.
Binary floats can only be powers of 1/2.
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140307/92bf222e/attachment.html>
More information about the Python-ideas
mailing list