Hi James -
thanks for your answer. Well, not all of the matrix stuff is faster than the `subst(poly,x,y)` method I had to learn... My first implementation using the matrix-based BASE interpretation in the integral needed about 100 times as much of your implementation. One can do big errors, since timing philosophy is little documented for Pari/GP ... Ok, changing order of evaluation and using real numbers instead of rational numbers I arrived at half of the speed of that `subst(subst())` construction.
I've done a little test on the evaluation of the BASE-polynomial. I observed, that if we apply \(x\) values at the coefficients of the BASE at a certain power of \(z\), then that evaluation is equivalent to only a polynomial of small order with factor \( \exp(-x) \) , so for instance, of we use the coefficients \( c_{r,2} \) at \(z^2 \) we have something like \( f(x,2) = sum_{k=0}^\infty c_{k,2} x^k = (x^2-8x+2) \cdot \exp(-x) \) where the polynomial expression has higher orders when the coefficients \( c_{r,j} \) are taken from \( z^j \). But possibly you know this - its just my exploration of this somehow unfamiliar construction of the BASE.
Here is a list of the first few polynomials:
Unfortunately I've no idea at the moment how to find a significant pattern, but of course that polynomials could -for 21 coefficients at z-powers only- be manually determined and coded in the program. Even don't know whether this is efficient at all; I'll see.
As side effect: I'm happy to finally see the theta-function "in action": how it is and for what it is used, at least in one instance...
(work in progress...)
thanks for your answer. Well, not all of the matrix stuff is faster than the `subst(poly,x,y)` method I had to learn... My first implementation using the matrix-based BASE interpretation in the integral needed about 100 times as much of your implementation. One can do big errors, since timing philosophy is little documented for Pari/GP ... Ok, changing order of evaluation and using real numbers instead of rational numbers I arrived at half of the speed of that `subst(subst())` construction.
I've done a little test on the evaluation of the BASE-polynomial. I observed, that if we apply \(x\) values at the coefficients of the BASE at a certain power of \(z\), then that evaluation is equivalent to only a polynomial of small order with factor \( \exp(-x) \) , so for instance, of we use the coefficients \( c_{r,2} \) at \(z^2 \) we have something like \( f(x,2) = sum_{k=0}^\infty c_{k,2} x^k = (x^2-8x+2) \cdot \exp(-x) \) where the polynomial expression has higher orders when the coefficients \( c_{r,j} \) are taken from \( z^j \). But possibly you know this - its just my exploration of this somehow unfamiliar construction of the BASE.
Here is a list of the first few polynomials:
Code:
j polynomial at z^j
- - - -- - - - - - - - - - - - - -
2 exp(-x)/(j-1)!/6* (6 )
3 exp(-x)/(j-1)!/6* (6 - 6x)
4 exp(-x)/(j-1)!/6* (6 - 24x + 9x^2)
5 exp(-x)/(j-1)!/6* (6 - 84x + 93x^2 - 18x^3 )
6 exp(-x)/(j-1)!/6* (6 - 306x + 765x^2 - 385x^3 + 45x^4)
7 exp(-x)/(j-1)!/6* (6 -1212x +6198x^2 -6110x^3 +6945x^4 - 135x^5 )
...Unfortunately I've no idea at the moment how to find a significant pattern, but of course that polynomials could -for 21 coefficients at z-powers only- be manually determined and coded in the program. Even don't know whether this is efficient at all; I'll see.
As side effect: I'm happy to finally see the theta-function "in action": how it is and for what it is used, at least in one instance...
(work in progress...)
Gottfried Helms, Kassel

