defect_N=0;
for(i=N-k+1; i<=N; i++) {
defect_tmp=1;
for(n=1; n<=steps; n++)
for(j=0; j<=N; j++)
defect_tmp-=P_tau_LH[n*(N+1)*(N+1)+i*(N+1)+j];
if(defect_tmp>defect_N)
defect_N=defect_tmp;
printf("%d %lf\n",i,defect_tmp);
}
printf("defect of P_tau_LH=%lf=%e defect_0=%lf, defect_N=%lf\n", max_double (defect_0,defect_N), max_double (defect_0,defect_N), defect_0, defect_N);