def dmp_revert(f, g, u, K):
 if (not u):
  return dup_revert(f, g, K)
 else:
  raise MultivariatePolynomialError(f, g)

def dmp_revert ( f , g , u , K ) : if ( not u ) : return dup_revert ( f , g , K ) else : raise MultivariatePolynomialError ( f , g )
compute f** mod x**n using newton iteration .