function err = err_fit(x,u,D,G)

%used in var_spher.m

v = spher(x,D);

err = sqsum(u,G,v) ;
