%CHECK_POS
%
function [min_int,min_anm1]=check_pos(n)
global a b ab ableg
dig=32; digits(dig);
a=1; b=0; 
m=ceil((n+1)/2);
xw=gauss(m,ab); x=xw(:,1); w=xw(:,1);
[V,D,xn]=Uconj_restr_jac_pos(dig,n);
d=diag(D); int=vpa(zeros(n,1)); anm1=vpa(zeros(n,1));
for j=1:n
  y=V(:,j);
  s=vpa(0);
  for mu=1:m
    lag=lagrange(n,xn,x(mu));
    s1=sum(lag.*y);
    int(j)=s+w(mu)*s1;
  end
end
for j=1:n
  y=V(:,j);
  s=0;
  for k=1:n
    i=[1:k-1,k+1:n];
    p=prod(xn(k)-xn(i));
    s=s+V(k,j)/p;
  end
  anm1(j)=s*conj(s);
end
min_int=10^200; min_anm1=10^200;
for j=1:n
  absint=abs(double(int(j))); danm1=double(anm1(j));
  if absint<min_int, min_int=absint; end
  if danm1<min_anm1, min_anm1=danm1; end
end 
%[double(int) double(anm1)]
