def M_to_D(M):
    """Parabolic anomaly from mean anomaly.
    Parameters
    ----------
    M : float
        Mean anomaly in radians.
    Returns
    -------
    D : float
        Parabolic anomaly.
    Notes
    -----
    This uses the analytical solution of Barker's equation from [5]_.
    """
    B = 3.0 * M / 2.0
    A = (B + (1.0 + B ** 2) ** 0.5) ** (2.0 / 3.0)
    D = 2 * A * B / (1 + A + A ** 2)
    return D