[Python-ideas] Settable defaulting to decimal instead of float

George Fischhof george at fischhof.hu
Thu Jan 12 09:36:45 EST 2017


Thank You, Terry

George

2017-01-12 14:50 GMT+01:00 Terry Reedy <tjreedy at udel.edu>:

> On 1/12/2017 8:09 AM, George Fischhof wrote:
>
> And if it is mentioned, I would like to ask why binary floating point is
>> "better". It is faster, I agree, but why "better"?
>>
>
> Binary numbers are more evenly spread out.  Consider successive two diget
> numbers .99, 1.0, 1.1.  The difference betweem the first two is .01 and
> that between the next pair is .1, 10 times as large.  This remains true for
> .999, 1.00, 1.01 or any other fixed number of digits. For binary floats,
> the gap size only doubles.  When I used slide rules, which have about 3
> digits of accuracy, some decades ago, this defect of decimal numbers was
> readily apparent.
>
> --
> Terry Jan Reedy
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170112/d09b9309/attachment.html>


More information about the Python-ideas mailing list