I've attached the patch to the issue's page - it's just a one-line
change :)

Akshay


On Jan 18, 8:58 pm, "Ondrej Certik" <ond...@certik.cz> wrote:
> On Sun, Jan 18, 2009 at 3:04 AM, Akshay Srinivasan
>
> <akshaysriniva...@gmail.com> wrote:
>
> > Hi Ondrej,
> > I think I've fixed it. As you said, it was something in the printing/
> > str.py.
>
> Excellent, when you are ready, send us a patch please (either to
> sympy-patches, or attach it to the issues).
>
> > In doing that I came across this,
> >>>(x/sin(x)).args()
> > (x,sin(x))
> >>>(cos(x)/sin(x)).args()
> > (1/sin(x),cos(x))
>
> > Shouldn't
> >>>(cos(x)/sin(x)).args()
> > give
> > (cos(x),1/sin(x))
> > ??
>
> It's because the terms are ordered with respect to their hashes, so
> it's platform specific. Mathematically it doesn't matter, because it's
> just a multiplication which is commutative, but I agree it may be
> confusing.
>
> I just looked how we do it in our experimental (fast) Cython core, we
> call it sympyx:
>
> http://groups.google.com/group/sympy/browse_thread/thread/aa3f4263bc3...
>
> and we also sort things using hashes. I think it's for efficiency
> reasons, so that when you compare things like x*y and y*x, you don't
> have to sort things again. But if you or anyone has any idea how to do
> this better, let's do it. You can easily implement this in sympyx,
> because it's small.
>
> Ondrej
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to