On Jan 4, 2008 10:01 AM, William Stein <[EMAIL PROTECTED]> wrote: > > > On Jan 3, 2008 12:13 PM, Ondrej Certik <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I posted my thoughts on the curent status and the future of Sage.calculus > > here: > > > > http://planet.sagemath.org/ > > > > direct link is: > > > > http://ondrejcertik.blogspot.com/2008/01/sympysympycore-pure-python-up-to-5x.html > > > > If you have some thoughts on that, let's discuss it. Unfortunately, I > > am very busy at school, > > so I myself cannot help a lot, but my hope is that there could be some > > google summer of > > code projects for improving Sage.calculus. > > Definitely. > > By the way, in your blog post you have this example: > > " > sympycore: > >>> from sympy import * > >>> x,y,z=map(Symbol,'xyz') > >>> xx=((x+y+z)**20).expand() > >>> yy=((x+y+z)**21).expand() > >>> %time e=(xx*yy).expand() > CPU times: user 2.21 s, sys: 0.10 s, total: 2.32 s > Wall time: 2.31 > swiginac: > >>> xx=((x+y+z)**20).expand() > >>> yy=((x+y+z)**21).expand() > >>> %time e=(xx*yy).expand() > CPU times: user 0.30 s, sys: 0.00 s, total: 0.30 s > Wall time: 0.30 > maxima: > (%i44) xx:expand((x+y+z)^20)$ > (%i45) yy:expand((x+y+z)^21)$ > (%i46) t0:elapsed_real_time ()$ expand (xx*yy)$ elapsed_real_time ()-t0; > (%o48) 0.57999999999993 > " > > Sage can do the benchmark above muh faster than all the other > systems you've time, including swiginac: > > sage: R.<x,y,z> = QQ[] > sage: xx = (x+y+z)^20; yy = (x+y+z)^21 > sage: time e=xx*yy > CPU times: user 0.03 s, sys: 0.00 s, total: 0.03 s > Wall time: 0.03 > > Note that expanding automatically happens for arithmetic in > multivariate polynomial > rings in Sage. Also the above timing is on a 2.6Ghz 32-bit OSX computer. > The underlying library that does the arithmetic is libsingular (i.e., > Martin's singular > library).
Right, that is interesting. It would be nice, if you did just sage: xx = (x+y+z)^20; yy = (x+y+z)^21 sage: time e=expand(xx*yy) in Sage.calculus and it would automatically recognize it's a polynomial and used libsingular. > > If you wanted to work modulo a prime (you probably don't since you're > a physicist), Such a think didn't even occur to me. :) Ondrej --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---