On Mon, Jul 21, 2008 at 08:12:42PM +0200, Ondrej Certik wrote: > > Hi, > > when I was at high school I remember figuring out how to factor this: > > In [1]: 2*x*y*z + x*y**2 + x*z**2 + y*x**2 + y*z**2 + z*x**2 + z*y**2 > Out[1]: > 2 2 2 2 2 2 > 2*x*y*z + x*y + x*z + y*x + y*z + z*x + z*y > > > If you don't know the result, which you don't, it's actually pretty > difficult. It took us couple hours with friens. Well, in pure Python > you can do just this: > > In [2]: %time factor(_) > CPU times: user 2.66 s, sys: 0.00 s, total: 2.66 s > Wall time: 2.67 s > Out[3]: (x + y)*(y + z)*(x + z) > > Not bad. However the time varies a lot on my laptop if I repeat it in > another ipython session -- from 0.7s (!) to 8s. Can anyone verify this > please? You need the latest hg sympy. Why is that?
Confirmed on 5d890816b79a. The time varies even in the same ipython session. -- Всего хорошего, Кирилл. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---