On Apr 18, 2011, at 11:51 AM, mario wrote:

> Hi,
> 
> I released rmpoly-0.0.6;
> elementary functions now work on arbitrary rings and on free algebras
> 
> example on rationals: series(1/cos(x),x,0,100)
>>>> from time import time
>>>> from rmpoly import *
>>>> from gmpy import mpq
>>>> rp,x = rgens('x',10,mpq)
>>>> h=100
>>>> t0=time();p = x.cos('x',h).pow_trunc(-1,'x',h); '%.2f'%(time()-t0)
> '0.03'
> 
> which is 3 orders of magnitude faster than sympy-0.6.7

Has the speed of SymPy increased with any of the recent improvements to the 
series, or in polys12?  

Anyway, I think that we can make our series faster by doing a similar thing, 
i.e., using the polys internally.

Aaron Meurer

> 
> example on free algebras: compute the Baker-Campbell_Hausdorff series
> up to order h=12
> 
>>>> from rmpoly.free_algebra import *
>>>> fa,A,B = fgens('A,B',mpq)
>>>> rp,x = ncrgens('x',10,fa)
>>>> def bch(x,A,B,h):
> ...   return
> ((x*A).exp('x',h)).mul_trunc((x*B).exp('x',h),'x',h).log('x',h)
> ...
>>>> t0=time();p = bch(x,A,B,12); '%.2f'%(time()-t0)
> '0.26'
> 
> One can add rules to the free algebra, like commutation and
> annihilation
> rules, see examples in http://code.google.com/p/rmpoly/wiki/Tutorial
> 
> Mario
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to [email protected].
> 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.
> 

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

Reply via email to