Working with the set of real numbers

Marko Rauhamaa marko at pacujo.net
Thu Feb 13 15:00:37 CET 2014


Oscar Benjamin <oscar.j.benjamin at gmail.com>:

> This isn't even a question of resource constraints: a digital computer
> with infinite memory and computing power would still be limited to
> working with countable sets, and the real numbers are just not
> countable. The fundamentally discrete nature of digital computers
> prevents them from being able to truly handle real numbers and real
> computation.

Well, if your idealized, infinite, digital computer had ℵ₁ bytes of RAM
and ran at ℵ₁ hertz and Python supported transfinite iteration, you
could easily do reals:

    def real_sqrt(y):
        for x in continuum(0, max(1, y)):
            # Note: x is not traversed in the < order but some other
            # well-ordering, which has been proved to exist.
            if x * x == y:
                return x
        assert False

The function could well return in finite time with a precise result for
any given nonnegative real argument.


Marko



More information about the Python-list mailing list