function varargout = objc(x,mode)

global numf numg numH

argout = 0;
u = exp(x(1)+3*x(2)-0.1);
v = exp(x(1)-3*x(2)-0.1);
w = exp(-x(1)-0.1);

if bitand(mode,1) 
  numf = numf + 1;
  argout = argout + 1;
  varargout(argout) = {u+v+w};
end
if bitand(mode,2) 
  numg = numg + 1;
  argout = argout + 1;
  varargout(argout) = {[u+v-w; 3*u-3*v]};
end
if bitand(mode,4) 
  numH = numH + 1;
  argout = argout + 1;
  varargout(argout) = {[u+v+w, 3*u-3*v; 3*u-3*v, 9*u+9*v]};
end
return;
