function cp = cumpotenz(aa,n)
%
% computes powers of a positive interval.
%
%  input:
% 	aa		intval, positive interval
% 	n		integer
%
%  output:
% 	cp(1:n+1,1)	intval, contains powers of aa
%
  if isreal(aa.inf) & isreal(aa.sup) &  aa.inf>=0    % non-negative interval
    cp=aa*ones(n,1);
    setround(-1);
    cpinf = cumprod(cp.inf);
    setround(1);
    cpsup = cumprod(cp.sup);
    cp=[intval(1); infsup(cpinf,cpsup)];
    setround(0);
  else
    disp(' ');
    disp(' ');
    disp('cumpotenz nur fuer nichtnegative a verfuegbar ');
    disp('Resultat: [] ');
    disp(' ');
    cp=[];
    return
  end
%
% written   05/20/00   D.Stoffer
%
