Comment #26 on issue 821 by Vinzent.Steinberg: multiple arguments for max and other improvements
http://code.google.com/p/sympy/issues/detail?id=821

Max(x, 1) will assume it is real

IMHO it should rather assume it could be real. So a lazily evaluated Max() is the way to go in this case.

Max(x, 1).subs(x, I)

should raise an exception, because we can be sure that it is not comparable.
I believe that at least in classic analysis the real set is a superset of any comparable set, so checking for 'is_real' might be sane.

Please note that for a complex input we have by default 'is_real == None'. So an exception could only be raised for 'is_real == False'.

Maybe we need some 'is_comparable' assumption to allow more flexibility? Or is this overkill?

About remove_duplicates(): Python 2.4 has sets, so I believe your code is still compatible. I'll verify this.

Now for something different: What do you think about Max.args being a frozenset instead of a tuple?



--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to