Issue 2104 in sympy: canonical ordering of terms

2010-11-21 Thread sympy
Status: Accepted Owner: smichr Labels: Type-Defect Priority-Medium New issue 2104 by smichr: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 The ordering of args appears to depend on the hash rather than mathematical criteria. It would be nice if it were not so

Re: Issue 2104 in sympy: canonical ordering of terms

2010-11-22 Thread sympy
Comment #1 on issue 2104 by asmeurer: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 The same is true for printing order. Printing order isn't as important when it comes to ordering on different machines, but we maybe could come up with a hash-independent f

Re: Issue 2104 in sympy: canonical ordering of terms

2010-11-25 Thread sympy
Comment #2 on issue 2104 by pevzi23: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 If honestly, I don't like sympy's printing order for expressions. For example: In [2]: x**2 - 1 Out[2]: 2 -1 + x In [3]: (x**2 - 1)**(-1) Out[3]: -1 ── 2 1

Re: Issue 2104 in sympy: canonical ordering of terms

2010-11-25 Thread sympy
Comment #3 on issue 2104 by mattpap: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 This can be improved easily: either run isympy with -o lex, or in a python interpreter issue: In [1]: from sympy import * In [2]: init_printing(order='lex') In [3]: var('x'

Re: Issue 2104 in sympy: canonical ordering of terms

2010-11-25 Thread sympy
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]:

Re: Issue 2104 in sympy: canonical ordering of terms

2011-01-21 Thread sympy
Comment #5 on issue 2104 by justin.y...@gmail.com: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 I'm a newbie at SymPy, and I must be doing something wrong. When I try to run "python isympy.py -o lex" I get the message that isympy doesn't have an -o opt

Re: Issue 2104 in sympy: canonical ordering of terms

2011-01-21 Thread sympy
Comment #6 on issue 2104 by asmeurer: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 Yeah, I think it's only implemented in the git master so far (see GettingTheBleedingEdge). It should be in the next release, though. -- You received this message because yo

Re: Issue 2104 in sympy: canonical ordering of terms

2011-01-22 Thread sympy
Comment #7 on issue 2104 by justin.y...@gmail.com: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 Okay, that's good to know. But I found a workaround for what I need: the LatexPrinter class has a "descending" flag that can be set, and I only need to reve

Re: Issue 2104 in sympy: canonical ordering of terms

2011-01-22 Thread sympy
Updates: Cc: mattpap Comment #8 on issue 2104 by asmeurer: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 Actually, the latex printer is not fixed for this, even in Mateusz's polys12 (issue 2133), which will also be part of the next release btw. Aaro

Re: Issue 2104 in sympy: canonical ordering of terms

2011-01-22 Thread sympy
Comment #9 on issue 2104 by justin.y...@gmail.com: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 My mistake. I had defined a shortcut function to automatically set the 'descending' flag. What I meant was the following: Python 2.7.0 console for SymP

Re: Issue 2104 in sympy: canonical ordering of terms

2011-01-22 Thread sympy
Comment #10 on issue 2104 by asmeurer: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 That should be a workaround for single variable polynomials, but this still needs to be fixed, because there is more to the various orderings than just reversing the order

Re: Issue 2104 in sympy: canonical ordering of terms

2011-01-22 Thread sympy
Comment #11 on issue 2104 by matt...@gmail.com: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 I fixed this in a35aed24bd016b3fd0e4d51113373f6f33530542, so workarounds won't be necessary anymore, e.g.: In [1]: latex(x**2 + 1, order='lex') Out[1]: x^{2} + 1

Re: Issue 2104 in sympy: canonical ordering of terms

2011-01-24 Thread sympy
Comment #12 on issue 2104 by justin.y...@gmail.com: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 I can't find this version on git (but I'm likely doing something goofy...) I git cloned the latest version, but the order keyword does nothing for latex().

Re: Issue 2104 in sympy: canonical ordering of terms

2011-01-24 Thread sympy
Comment #13 on issue 2104 by asmeurer: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 Mateusz's comment was a little misleading. He has only implemented it in his branch, polys12. To get it, you need to do git remote add mattpap git://github.com/mattpap/sy

Re: Issue 2104 in sympy: canonical ordering of terms

2011-01-25 Thread sympy
Comment #14 on issue 2104 by justin.y...@gmail.com: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 Thanks very much; found it! -- You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group, send ema

Re: Issue 2104 in sympy: canonical ordering of terms

2011-08-05 Thread sympy
Updates: Status: Fixed Owner: --- Cc: -matt...@gmail.com Comment #15 on issue 2104 by matt...@gmail.com: canonical ordering of terms http://code.google.com/p/sympy/issues/detail?id=2104 This was fixed in 0.7.0. -- You received this message because you are subscribed to t