def rs_hadamard_exp(p1, inverse=False):
 R = p1.ring
 if (R.domain != QQ):
  raise NotImplementedError
 p = R.zero
 if (not inverse):
  for (exp1, v1) in p1.items():
   p[exp1] = (v1 / int(ifac(exp1[0])))
 else:
  for (exp1, v1) in p1.items():
   p[exp1] = (v1 * int(ifac(exp1[0])))
 return p

def rs_hadamard_exp ( p1 , inverse = False ) : R = p1 . ring if ( R . domain != QQ ) : raise NotImplementedError p = R . zero if ( not inverse ) : for ( exp1 , v1 ) in p1 . items ( ) : p [ exp1 ] = ( v1 / int ( ifac ( exp1 [ 0 ] ) ) ) else : for ( exp1 , v1 ) in p1 . items ( ) : p [ exp1 ] = ( v1 * int ( ifac ( exp1 [ 0 ] ) ) ) return p
return sum f_i/i!*x**i from sum f_i*x**i .