Comment #4 on issue 2104 by asmeurer: canonical ordering of terms
http://code.google.com/p/sympy/issues/detail?id=2104

Even with the -o lex option, there are some less than ideal printing orderings:

In [3]: x*cos(x) + cos(x) + x**2*cos(x) + cos(x**2) + x*cos(x**2) + x**2*cos(x**2)
Out[3]:
 2           2    ⎛ 2⎞                   ⎛ 2⎞               ⎛ 2⎞
x ⋅cos(x) + x ⋅cos⎝x ⎠ + x⋅cos(x) + x⋅cos⎝x ⎠ + cos(x) + cos⎝x ⎠

And the worst thing is that it performs differently on 64-bit:

In [3]: x*cos(x) + cos(x) + x**2*cos(x) + cos(x**2) + x*cos(x**2) + x**2*cos(x**2)
Out[3]:
                ⎛ 2⎞    2           2    ⎛ 2⎞               ⎛ 2⎞
x⋅cos(x) + x⋅cos⎝x ⎠ + x ⋅cos(x) + x ⋅cos⎝x ⎠ + cos(x) + cos⎝x ⎠

By the way, can we implement something where I just set an environment variable and it always runs with -o lex? I really hate the reverse lexicographic ordering in printing.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-iss...@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