@mattpap any suggestions on a better way to do this? The function figures out the real and imaginary part of a polynomial evaluated at sqrt(-1). It has this as_poly(sqrt(-1)) stuff to deal with complex coefficients, like `I*t**2 + 1`.  I'm obviously not too keen on the `as_poly(sqrt(-1))` part, but I'm not sure what the best way to do this would be.