[GiNaC-list] Poles and zeros

Vitaly Magerya vmagerya at gmail.com
Wed Apr 3 21:21:08 CEST 2019


On 01/04/2019 17:19, Patrick Schulz wrote:
> I'm trying to calculate the poles and zeros of a polynomial and I 
> thought some functions to do this, but I can't find anything anymore. Is 
> there any easy option currently to do this? If not, where would I start 
> implementing this? I don't really grok the GiNaC structure. I'm happy to 
> write a pull request (if I get it done).

I think your best bet is to use factor(), then enumerate the factors, 
then use factor.degree(x) to see if you have a factor of the form ax+b, 
ax^2+bx+c, etc, then use factor.coeff(x, 0/1/2) to get a/b/c, and work 
from there. This is what I do.


More information about the GiNaC-list mailing list