Python math is off by .000000000000045

Terry Reedy tjreedy at
Sun Feb 26 00:44:08 EST 2012

On 2/25/2012 9:49 PM, Devin Jeanpierre wrote:

> What this boils down to is to say that, basically by definition, the
> set of numbers representable in some finite number of binary digits is
> countable (just count up in binary value). But the whole of the real
> numbers are uncountable. The hard part is then accepting that some
> countable thing is 0% of an uncountable superset. I don't really know
> of any "proof" of that latter thing, it's something I've accepted
> axiomatically and then worked out backwards from there.

Informally, if the infinity of counts were some non-zero fraction f of 
the reals, then there would, in some sense, be 1/f times a many reals as 
counts, so the count could be expanded to count 1/f reals for each real 
counted before, and the reals would be countable. But Cantor showed that 
the reals are not countable.

But as you said, this is all irrelevant for computing. Since the number 
of finite strings is practically finite, so is the number of algorithms. 
And even a countable number of algorithms would be a fraction 0, for 
instance, of the uncountable predicate functions on 0, 1, 2, ... . So we 
do what we actually can that is of interest.

Terry Jan Reedy

More information about the Python-list mailing list