Compute error on fminscg