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



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