OK, here is one thing.  If `zeta = exp(2*I/5)`, then `zeta**2 = exp(4*I/5)` (and so on). So I think we can more efficiently compute the powers of zeta in R1, R2, R3, and R4.

And even if we couldn't, we could at least expand them only once and then use that in each, removing the duplicated computations in lines 395-398.