import math


def tan_sqr(deg):
    """
    Returns tan^2(x), based on the trig identity:

    1 - cos(2x)
    ------------- = tan^2(x)
    1 + cos(2x)

    Parameters
    ------------
    deg : int or float
        Angle, in degrees, to plug into tan^2(x)

    Returns
    ------------
    result : int/float
        tan^2(deg)
    """
    rad = math.radians(deg)
    num = 1 - math.cos(2 * rad)
    denom = 1 + math.cos(2 * rad)
    result = num / denom

    return result