% Test the arb prec integer arithmetic. Barnett 4/30/13
x = [1 2 3 4 5 6 7 8 9 1 5 2 5 1 6 3]; % a big number in base 10
%x = [1 2 3 4 5 6 7 8 9 1 5 0 5 1 6 4 7 3 2 5 1 6]; % this too big for matlab!
z = bigintadd(x,x,10);
xx = sum(x .* 10.^(numel(x)-1:-1:0)); % convert x, z to Matlab integers
zz = sum(z .* 10.^(numel(z)-1:-1:0));
xx + xx - zz
disp('should be zero')
% note, a real test suite should add a variety of large and small numbers, etc

