def ps2eq(ps):
    """Convert polynomial coefficients to text

    Parameters
    ----------
    ps : list of float
        List of polynomial coefficients

    Returns
    -------
    str
        String representation of the polynomial
    """
    n = len(ps)
    f = "".join(f"{p:+} * x^{n-i}" for i, p in enumerate(ps, start=1))
    if "+" == f[0]: f = f[1:]
    f = f.replace("-", " - ")
    f = f.replace("+", " + ")
    # -6 to cut the ` * x^0` at the end
    return f[:-6]