These are chat archives for symengine/symengine
.cppin the same directory.
my_pairprepared, so how do I pass the arguments to
@bluescarni I am very sorry for my late reply.
The reason we want to use polynomials is that any truncated series is basically a polynomial (sometimes with fractional and negative powers, though). We are using polys'
ring structure because it is sparse and sparse representation along with the use of polynomial structure gives tremendous speed-up. I tried cos(a+b) for example.
ring_series does not yet take a constant term so I had to separate them myself.
In : R,x,y= ring('x,y',QQ[sin(a), cos(a)]) In : %timeit cos(a)*rs_cos(x,x,200) - sin(a)*rs_sin(x,x,200) 10 loops, best of 3: 21.5 ms per loop In : %timeit cos(a+b).series(a,0,200) 1 loops, best of 3: 6.8 s per loop
I am wondering if it is possible to have a generator as the coefficient. The
ring I am currently using doesnt seem to allow that.
Thank you for the code. It will be very helpful when I port it to symengine.