def drag(M):
    """Drag coefiicient of a cylinder in transonic flight.

    Reference: S. F. Hoerner, "Fluid-Dynamic Drag" Ch 16.3

    Arguments:
        M (scalar): Mach number [units: dimensionless].

    """
    # Hoerner says K_fore = 0.9. The formula below is a hack to
    # make the curve match Hoerner ch 16 figure 14.
    K_fore = 0.9 if M > 1 else 0.8
    # Stagnation pressure increment / dynamic pressure
    qq = 1 + M**2/4 + M**4/10    # Eqn 15.4
    if M >= 1:
        # Include pressure loss due to normal shock
        qq = 1.84 - 0.76/M**2 + 0.166/M**4 + 0.035/M**6    # Eqn 16.4
    C_D = K_fore * qq
    return C_D