(f, g, *gens, **args)
Compute polynomial pseudo-remainder of ``f`` and ``g``.

    Examples
    ========

    >>> from sympy import prem
    >>> from sympy.abc import x

    >>> prem(x**2 + 1, 2*x - 4)
    20
Compute polynomial pseudo-remainder of ``f`` and ``g``.
Compute polynomial pseudo - remainder of f and g .
def prem(f, g, *gens, **args):
    """
    Compute polynomial pseudo-remainder of ``f`` and ``g``.

    Examples
    ========

    >>> from sympy import prem
    >>> from sympy.abc import x

    >>> prem(x**2 + 1, 2*x - 4)
    20

    """
    options.allowed_flags(args, ['polys'])

    try:
        (F, G), opt = parallel_poly_from_expr((f, g), *gens, **args)
    except PolificationFailed as exc:
        raise ComputationFailed('prem', 2, exc)

    r = F.prem(G)

    if not opt.polys:
        return r.as_expr()
    else:
        return r
def prem ( f , g , * gens , * * args ) : options . allowed_flags ( args , [ 'polys' ] ) try : ( F , G ) , opt = parallel_poly_from_expr ( ( f , g ) , * gens , * * args ) except PolificationFailed as exc : raise ComputationFailed ( 'prem' , 2 , exc ) r = F . prem ( G ) if not opt . polys : return r . as_expr ( ) else : return r