def evaluation(xnodes,weights,fvalues,value):
    """
    Evaluating the barycentric interpolant p(x)
    p(x) = \sum_{j=0}^{n} ((w_j f(x_j))/(x-x_j))/ (\sum_{j=0}^{n} w_j/(x-x_j))
    where w_j = 1/(pi*(x_j - x_i) { j \= i})
    Inputs: nodes x_j, weights w_j, f(x_j) and the location of where teh interpolant should be evaluated
    Output: p(x) at all the evaluation points
    """
    num = 1
    sum1 = 0
    sum2 = 0
    for j in range(len(xnodes)):
        if value != xnodes[j]:
            num = (weights[j]*fvalues[j])/(value - xnodes[j])
            sum1 += num
    for j in range(len(xnodes)):
        if value != xnodes[j]:
            num = (weights[j])/(value - xnodes[j])
            sum2 += num
    return sum1/sum2