function [x,y,z]=mpadd(x,y,z);
%***BEGIN PROLOGUE MPADD
%***SUBSIDIARY
%***PURPOSE Subsidiary to DQDOTA and DQDOTI
%***LIBRARY SLATEC
%***TYPE ALL (MPADD-A)
%***AUTHOR (UNKNOWN)
%***DESCRIPTION
%
% Adds X and Y, forming result in Z, where X, Y and Z are 'mp'
% (multiple precision) numbers. Four guard digits are used,
% and then R*-rounding.
%
%***SEE ALSO DQDOTA, DQDOTI
%***ROUTINES CALLED MPADD2
%***REVISION HISTORY (YYMMDD)
% 791001 DATE WRITTEN
% 890831 Modified array declarations. (WRB)
% 891214 Prologue converted to Version 4.0 format. (BAB)
% 900402 Added TYPE section. (WRB)
%***end PROLOGUE MPADD
x_shape=size(x);x=reshape(x,1,[]);
y_shape=size(y);y=reshape(y,1,[]);
z_shape=size(z);z=reshape(z,1,[]);
%***FIRST EXECUTABLE STATEMENT MPADD
y_orig=y; [x,y,z,dumvar4]=mpadd2(x,y,z,y,0); y(dumvar4~=y_orig)=dumvar4(dumvar4~=y_orig);
x_shape=zeros(x_shape);x_shape(:)=x(1:numel(x_shape));x=x_shape;
y_shape=zeros(y_shape);y_shape(:)=y(1:numel(y_shape));y=y_shape;
z_shape=zeros(z_shape);z_shape(:)=z(1:numel(z_shape));z=z_shape;
end
%DECK MPBLAS