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



Robert Dodier a ?crit :
> 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.
>   
I don't see all implications to maxima, but mathematically speaking I 
would prefer saying  %i < 3  is undefined, not false. As far as I know, 
no binary relation x<y has ever been defined on the set of maxima 
complex numbers. It is possible to define such a relation (for instance 
using  C=R^2 and lexicographic order), even compatible with the usual 
relation on real numbers ; it will be useless in practice since 
uncompatible with operations on complex numbers, but it may satisfy 
(%i<3)=true (after all, the real part of %i is less than real part of 3).

I may be wrong but I think  (%i<3)=undefined is safer than (%i<3)=false, 
which might be interpreted as (%i>=3)=true by some users or maybe even 
by some hidden maxima rules.

Sorry if this remark is too mathematical and out of maxima syntax rules.

Eric
> 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
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>