>
> Personally, I don't think that anything should rely on automatic
> cancelation, especially rref().  If you have a matrix with symbolic
> terms, and you want to do an rref, you have to pass the flag
> simplified=True, or you will get wrong answers.
>
>
I agree. I didn't open this as an issue because I suspected that it's not
something that should really be fixed. It's only serendiipitous that the
reversed order of terms would have given a simpler expression: Python
handles the Mul one term at a time and the negative one and the first Add
join (I guess) and there's nothing to do about that.

Regarding the matrix and simplified...I think it would make sense to apply
sign simplification (as is done by cse) so a symbolic matrix doesn't blow
up. Consider the following (using the same matrix as referred to
previously):

>>> r=m.row_join(eye(9)).rref()
>>> rr=r[0][:,9:]

>>> len(str(r))
9759
>>> rr.det() # obtained instantly
1/(4*x**4 - 8*x**2)

Without sign simplification during rref you get a result that is 20X larger:

>>> len(str(r))
191775
>>> rr.det()
(I quit waiting after about 2 minutes)

/c

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

Reply via email to