Fix improper summing of Gauss-Legendre points

By mistake, I had basically implemented:

    y += w[N] (f[N] + w[N-1] (f[N-1] + ... + w[1] f[1]))

instead of:

    y = w[1] f[1] + w[2] f[2] + ... + w[N] f[N]