Working with the set of real numbers

Marko Rauhamaa marko at pacujo.net
Wed Feb 12 09:13:11 EST 2014


Chris Angelico <rosuav at gmail.com>:

> On Wed, Feb 12, 2014 at 11:48 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> According to your definition, there's no computer in the world that can
>> work with integers or text files.
>
> Integers as far as RAM will allow, usually (which is the same caveat
> as is used when describing a programming language as "Turing complete"
> - strictly, that term is valid only if it has infinite memory
> available), but yes, technically that's a subset of integers. However,
> that subset is bounded by something other than the code, algorithms,
> or even hardware - it's theoretically possible to add two numbers
> larger than will fit in memory, by reading them in (even over the
> network), adding segments, and writing them out again.
>
> Text files. Since there's already no such thing as a "text file"
> unless you know what its encoding is, I don't see a problem with this.

Text files suffer from the same caveat as integers: there's a limit to
how much you can store on the physical computer.

A similar caveat prevents computers from dealing with real numbers. In
the case of integers, you have a finite subset of ℵ₀. In the case of
reals, you have a finite subset of ℵ₁.

Yes, integers are algorithmically much more tractable than reals.
However, in practice integer math is often computationally much harder
than real math. Take cryptography vs calculus as an example.


Marko



More information about the Python-list mailing list