(f, n)
Compute ``f**(-1)`` mod ``x**n``.
Compute ``f**(-1)`` mod ``x**n``.
Compute f ** ( - 1 ) mod x ** n .
def revert(f, n):
        """Compute ``f**(-1)`` mod ``x**n``. """
        if not f.lev:
            return f.per(dup_revert(f.rep, n, f.dom))
        else:
            raise ValueError('univariate polynomial expected')
def revert ( f , n ) : if not f . lev : return f . per ( dup_revert ( f . rep , n , f . dom ) ) else : raise ValueError ( 'univariate polynomial expected' )