def _func_parallelfraction(f, p, n):
    """
    Model function to calculate the parallel fraction.

    :param f: Actual parallel fraction parameters values
    :param p: Numbers of cores used on model data
    :param n: Problems size used on model data
    :return: calculated parallel fraction value
    """

    fp = f[0] + f[1]/p + f[2]*pow(f[3], n)
    return max(min(fp, 1), 0)