(a, p)
Coerce ``a mod p`` to an integer in the range ``[-p/2, p/2]``.

    Examples
    ========

    >>> from sympy.polys.galoistools import gf_int

    >>> gf_int(2, 7)
    2
    >>> gf_int(5, 7)
    -2
Coerce ``a mod p`` to an integer in the range ``[-p/2, p/2]``.
Coerce a mod p to an integer in the range [ - p / 2 p / 2 ] .
def gf_int(a, p):
    """
    Coerce ``a mod p`` to an integer in the range ``[-p/2, p/2]``.

    Examples
    ========

    >>> from sympy.polys.galoistools import gf_int

    >>> gf_int(2, 7)
    2
    >>> gf_int(5, 7)
    -2

    """
    if a <= p // 2:
        return a
    else:
        return a - p
def gf_int ( a , p ) : if a <= p // 2 : return a else : return a - p