import math


def equation_of_time(doy):
    """Equation of time in minutes. Plus means sun leads local time.
    
    Example (1 October):
    >>> print("%.4f" % equation_of_time(274))
    0.1889
    """
    b = 2 * math.pi * (doy - 81) / 364.0
    return 0.1645 * math.sin(2 * b) - 0.1255 * math.cos(b) - 0.025 * math.sin(b)