Bug report ID 2123651 "min and max of imaginary and real numbers"



No, %i < 3 is undefined, not false.  The domain of '<' does not include %i.
If you believe that max(%i,3) is undefined, but %i < 3, then presumably you
would like 3 < %i to also be false.  Then max is undefined because a<b is
inconsistent with b<a.  But do we really want such non-transitivity in the
system?  What is the point of a non-transitive <?

I agree that thrown errors should contain more information.

About returning noun-forms, yes, that can be very useful, but I'm not sure
how far you want to take that if you want a system to be practical.  If you
follow that philosophy, then to sort a list, you must perform all n^2
comparisons (not even n^2/2 because you can't assume reflexivity presumably)
and then what is the result of 'sort' in the general case -- some sort of
DAG rather than a list?  Or some very big conditional expression?

             -s

On Mon, Sep 6, 2010 at 15:58, Robert Dodier <robert.dodier at gmail.com> wrote:

> On 9/5/10, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
>
> > One thing: I'd think that any comparisons involving imaginary quantities
> > should give errors, not nounforms or unknown.  It is not that %i < 3 is
> > unknown, it is actually not defined.  True, a*%i < 3 for a=0, so a
> nounform
> > might be sensible there, but I'd rather catch the anomaly.
>
> Well, %i < 3 is just false, right? It's not undefined.
> On the other, max(%i, 3) is actually undefined.
> (Unless we agree to some convention, e.g. max(%i, 3) = false.
> I'll put that aside for now.)
>
> My preference is to throw something which contains info
> about the problem so that it could be handled programmatically.
> I mean something like throw(undefined(max(%i, 3))).
> (Triggering an error, or returning und, doesn't contain info
> that could be used programmatically.)
>
> max(%i*a, 3) is an interesting case, since it is well-defined
> for a = 0. My preference in this case is to return a noun
> expression. That is essentially postponing the result until
> something more is known about a (whether it is 0 or non-0).
>
> best,
>
> Robert Dodier
>