function [i1]=mpblas(i1);
persistent mpbexp ;
global mpcom_1; if isempty(mpcom_1), mpcom_1=0; end;
if isempty(mpbexp), mpbexp=0; end;
global mpcom_4; if isempty(mpcom_4), mpcom_4=0; end;
global mpcom_3; if isempty(mpcom_3), mpcom_3=0; end;
global mpcom_5; if isempty(mpcom_5), mpcom_5=0; end;
global mpcom_6; if isempty(mpcom_6), mpcom_6=zeros(1,30); end;
global mpcom_2; if isempty(mpcom_2), mpcom_2=0; end;
%***BEGIN PROLOGUE MPBLAS
%***SUBSIDIARY
%***PURPOSE Subsidiary to DQDOTA and DQDOTI
%***LIBRARY SLATEC
%***TYPE ALL (MPBLAS-A)
%***AUTHOR (UNKNOWN)
%***DESCRIPTION
%
% This subroutine is called to set up Brent's 'mp' package
% for use by the extended precision inner products from the BLAS.
%
% In the SLATEC library we require the Extended Precision MP number
% to have a mantissa twice as long as doubleprecision numbers.
% The calculation of MPT (and MPMXR which is the actual array size)
% in this routine will give 2x (or slightly more) on the machine
% that we are running on. The INTEGER array size of 30 was chosen
% to be slightly longer than the longest INTEGER array needed on
% any machine that we are currently aware of.
%
%***SEE ALSO DQDOTA, DQDOTI
%***REFERENCES R. P. Brent, A Fortran multiple-precision arithmetic
% package, ACM Transactions on Mathematical Software 4,
% 1 (March 1978), pp. 57-70.
% R. P. Brent, MP, a Fortran multiple-precision arithmetic
% package, Algorithm 524, ACM Transactions on Mathema-
% tical Software 4, 1 (March 1978), pp. 71-81.
%***ROUTINES CALLED I1MACH, XERMSG
%***COMMON BLOCKS MPCOM
%***REVISION HISTORY (YYMMDD)
% 791001 DATE WRITTEN
% 890531 Changed all specific intrinsics to generic. (WRB)
% 890531 REVISION DATE from Version 3.2
% 891214 Prologue converted to Version 4.0 format. (BAB)
% 900402 Added TYPE section. (WRB)
% 920501 Reformatted the REFERENCES section. (WRB)
% 930124 Increased Array size in MPCON for SUN -r8, and calculate
% size for Quad Precision for 2x DP. (RWC)
%***end PROLOGUE MPBLAS
% common :: ;
%% common /mpcom / mpb , mpt , mpm , mplun , mpmxr , mpr(30);
%% common /mpcom / mpcom_1 , mpcom_2 , mpcom_3 , mpcom_4 , mpcom_5 , mpcom_6(30);
%***FIRST EXECUTABLE STATEMENT MPBLAS
i1 = 1;
%
% For full extended precision accuracy, MPB should be as large as
% possible, subject to the restrictions in Brent's paper.
%
% Statements below are for an integer wordlength of 48, 36, 32,
% 24, 18, and 16. Pick one, or generate a new one.
% 48 MPB = 4194304
% 36 MPB = 65536
% 32 MPB = 16384
% 24 MPB = 1024
% 18 MPB = 128
% 16 MPB = 64
%
mpbexp = fix(i1mach(8)./2 - 2);
mpcom_1 = fix(2.^mpbexp);
%
% Set up remaining parameters
% UNIT FOR ERROR MESSAGES
[mpcom_4 ]=i1mach(4);
% NUMBER OF MP DIGITS
mpcom_2 =fix((2.*i1mach(14)+mpbexp-1)./mpbexp);
% DIMENSION OF R
mpcom_5 = fix(mpcom_2 + 4);
%
if( mpcom_5>30 )
xermsg('SLATEC','MPBLAS',['Array space not sufficient for Quad Precision 2x ','doubleprecision, Proceeding.'],1,1);
mpcom_2 = 26;
mpcom_5 = 30;
end;
% EXPONENT RANGE
mpcom_3 = fix(min(32767,i1mach(9)./4-1));
end
%DECK MPCDM