def poly5(x, a5, a4, a3, a2, a1, a0, export=False):
    """Polynom 5th degree for fitting.

    :param x: parameter
    :param a5: coeff
    :param a4: coeff
    :param a3: coeff
    :param a2: coeff
    :param a1: coeff
    :param a0: coeff
    :param export: enable text output of function

    :returns: function -- polynomial 5th degree
    """
    if export == 'Mathematica':
        return f'((((({a5}*{x} + {a4})*{x} + {a3})*{x} + {a2})*{x} + {a1})*{x} + {a0})'
    else:
        return (((((a5*x + a4)*x + a3)*x + a2)*x + a1)*x + a0)