def T0_T0star(M, gamma):
    """Total temperature ratio for flow with heat addition (eq. 3.89)

    :param <float> M: Initial Mach #
    :param <float> gamma: Specific heat ratio

    :return <float> Total temperature ratio T0/T0star
    """

    t1 = (gamma + 1) * M ** 2
    t2 = (1.0 + gamma * M ** 2) ** 2
    t3 = 2.0 + (gamma - 1.0) * M ** 2

    return t1 / t2 * t3