#NEWLINE# def dup_mirror( f , K ) : #NEWLINE# #INDENT# '\n    Evaluate efficiently the composition ``f(-x)`` in ``K[x]``.\n\n    Examples\n    ========\n\n    >>> from sympy.polys import ring, ZZ\n    >>> R, x = ring("x", ZZ)\n\n    >>> R.dup_mirror(x**3 + 2*x**2 - 4*x + 2)\n    -x**3 + 2*x**2 + 4*x + 2\n\n    ' #NEWLINE# f = list ( f ) #NEWLINE# for i in range ( ( len ( f ) - 2 ) , ( - 1 ) , ( - 2 ) ) : #NEWLINE# #INDENT# f [ K ] = ( - f [ i ] ) #NEWLINE# #UNINDENT# return f