Revision history [back]

If $f$ is an explicit rational function, than asking for the roots of the denominator and checking their absolute value is the solution. For instance:

sage: var( 'z' );
sage: f = z^7 / ( z^8 + z^5 + z + 1 )
sage: den = f.denominator()
sage: [ root for root, multiplicity in den.roots( ring=QQbar ) if abs(root) < 1 ]
[-0.8311059461834221?,
-0.4328488202738278? - 0.7797723123924101?*I,
-0.4328488202738278? + 0.7797723123924101?*I]


If the (rational) function also contains symbolic variables, than the code should somehow know "what kind of symbolic" is / may be involved.

If $f$ is rather complicated, e.g. $f(z) = 1/(1-\exp( z^4 +z ) -1/z$ then asking for the (numerical) roots of $1/f$ may be the solution. Same conclusion, same comment, the question is vague.

If $f$ is an explicit rational function, than asking for the roots of the denominator and checking their absolute value is the solution. For instance:

sage: var( 'z' );
sage: f = z^7 / ( z^8 + z^5 + z + 1 )
sage: den = f.denominator()
sage: [ root for root, multiplicity in den.roots( ring=QQbar ) if abs(root) < 1 ]
[-0.8311059461834221?,
-0.4328488202738278? - 0.7797723123924101?*I,
-0.4328488202738278? + 0.7797723123924101?*I]


If the (rational) function also contains symbolic variables, than the code should somehow know "what kind of symbolic" is / may be involved.

If $f$ is rather complicated, e.g. $f(z) = 1/(1-\exp( z^4 +z ) )) -1/z$ then asking for the (numerical) roots of $1/f$ may be the solution. Same conclusion, same comment, the question is vague.