def p02_p01(M1, gamma):
    """Stagnation pressure ratio across a normal shock

    :param <float> M1: Mach # before the shock
    :param <float> gamma: Specific heat ratio

    :return <float> Stagnation pressure ratio p02/p01
    """

    t1 = (gamma + 1.0) / (2.0 * gamma * M1 ** 2 - (gamma - 1.0))
    t2 = (gamma + 1.0) * M1 ** 2 / (2.0 + (gamma - 1.0) * M1 ** 2)

    return t1 ** (1.0 / (gamma - 1.0)) * t2 ** (gamma / (gamma - 1.0))