Re: 'infinity' in GiST index

From: Andrew - Supernews <andrew+nonews(at)supernews(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: 'infinity' in GiST index
Date: 2005-05-05 17:01:20
Message-ID: slrnd7kkb0.2ep3.andrew+nonews@trinity.supernews.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2005-05-05, "Dave Held" <dave(dot)held(at)arraysg(dot)com> wrote:
> That's because you're talking about transfinite arithmetic, and
> subtraction is not defined therein. AKA "the arithmetic of
> infinite cardinals". I've actually seen a few different
> formulations, some of which say that adding a finite number to
> an infinity results in a different number than the infinity, and
> some that say it is the original infinity. However, it seems
> that the most common formulation is the latter:
>
> w + 1 = w
>
> Where w is lower-case omega, or aleph_0.

No; you're confusing your cardinals and your ordinals. aleph_0 is a
cardinal number (the cardinality of any infinite countable set);
omega is an ordinal number. The arithmetic of transfinite ordinals is
completely different to that of cardinals; the most obvious example of
this is that addition involving transfinite ordinals is not commutative:

1 + w = w != w + 1

(Think of this as follows: 1 + w represents a single item followed by an
infinite sequence; this is indistinguishable from the infinite sequence
alone. w + 1 is an infinite sequence followed by a single item; this is
not equivalent to the original sequence, so you can continue to w + 2,
w + 3, ... w + w = 2w and so on.)

In contrast the arithmetic of cardinals behaves quite differently:

a_0 + 1 = a_0
a_0 + a_0 = 2 x a_0 = a_0
a_0 x a_0 = a_0 ^ 2 = a_0

2 ^ a_0 = C > a_0

(A countable infinite set with an item added is still countable. Two
countable infinite sets can be counted by taking items alternately from
each. A square whose dimensions are countably infinite can be counted by
starting at any point and spiralling outwards. C, which may or may not be
a_1 but is larger than a_0, is the cardinality of the real numbers; this
is shown not to be countable, and therefore > a_0, by Cantor's famous
diagonal argument.)

But this is all irrelevent to the original question, because the 'infinity'
used in floating-point arithmetic corresponds neither to transfinite
cardinals nor transfinite ordinals, but instead is an arbitrary label with
its own rules, defined as follows in IEEE arithmetic:

+Inf + +Inf = +Inf
+Inf - +Inf = NaN
+Inf + -Inf = NaN
+Inf * 0 = NaN
+Inf / +Inf = NaN

etc.

--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2005-05-05 17:01:22 Re: [pgsql-advocacy] Increased company involvement
Previous Message Andreas Pflug 2005-05-05 16:55:38 Re: Views, views, views! (long)