function out=fix(x)

precision=x(1).precision;
out_rval=cell(size(x));
out_ival=cell(size(x));

for ii=1:numel(x)
 imag=false;
 [xrval,xival]=getVals(x,ii);
 if hasimag(xival), imag=true; end
 if imag
  out_rval{ii}=mpfr_fix(precision,xrval);
  out_ival{ii}=mpfr_fix(precision,xival);
 else
  out_rval{ii}=mpfr_fix(precision,xrval);
 end
end % for ii=1:max(ex,
out=class(struct('rval',out_rval,...
                  'ival',out_ival,...
                  'precision',precision),'mp');

