[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


I'm back from an exhausting, and therefore very restful, vacation.
Back into the fray!

   Date: Thu, 27 Jul 89 21:15 EDT
   From: Alan Bawden <Alan@reagan.ai.mit.edu>

   I wonder, by the way, what those of you who insist that MAX must return
   something EQV? to one of its arguments because "MAX computes -the- maximum
   of a set of numbers", think should be the answer in the case of (MAX 1 1.0)? 

Either 1 or 1.0.  By the same token I believe the result of (MAX 1 1)
may be either occurrence of "1" (by stating it this way I avoid
commmitment on the question of whether the two occurrences of "1" are
the same or not).

Here is a new proposal.  Given a set of points within a partial order,
there are two interesting kinds of "max"-like operation.  One is to find
some point (not necessarily within the set) that is >= all points in the
given set; this is SUP.  In a general poset there may be many such points;
the lattice property guarantees uniqueness.

Another is to find some point in the set such that no point in the set is >
that point.  This can fail for infinite sets, but that cannot occur in
Scheme.  It may also be that there is more than one such point in the set.
In that case we must define some tie-breaking rule (arbitrary choice is one
such rule).  One partial tie-breaking rule that I find appealing is to
choose one of the least exact of otherwise qualified candidates.  I had
earlier proposed to call this second operation MAX.

The new proposal is the call the first kind SUP (as before), and to
call the second kind LARGEST (similarly INF and SMALLEST).  Let Scheme
have no built-in operations called MIN and MAX.

I still believe both kinds of operation are useful.  They reflect two
different points of view about inexact numbers.  One is that they are
shadows of Platonically ideal real numbers, pitifully striving to mirror
the behavior of their exact counterparts and to retain some record of the
degree of their failure.  The other is that they are objects unto
themselves, obeying perfectly an algebraic system that is useful because it
is similar, though not identical, to that for real numbers and much easier
to implement.

Theologically or politically speaking, under the first view inexact numbers
strive to obey laws acknowledged to be perfect, but to a greater or lesser
degree are each in a state of sin.  Under the second view they are all
model citizens, adhering perfectly to their own laws which, however, are
acknowledged not to be ideal but merely the best one can do in this
imperfect and finite world.