#include #include #include #include "l.h" R det(R *, int, int); R min(R x, R y){return x1) { int y=k; while(y--) dp[y] = at.a[k*a.c[i*a.d+iv] + y] - at.a[k*a.c[i*a.d] + y]; dp += k;}} {int iv=b.d; while(iv-->1) { int y=k; while(y--) dp[y] = bt.a[k*b.c[i*b.d+iv] + y] - bt.a[k*b.c[i*b.d] + y]; dp += k;}} {R r2 = 0; int y=k; while(y--){R d = cnta[i][y] - cntb[j][y]; dp[y] = d; r2 += d*d;} if(0) pm((mat){D, k, k}, "D"); R rk = k&1?sqrt(r2):r2; {int q=(k-1)/2; while (q--) rk *= r2;} if(0){R d = det(D, k, k); intg += d/rk; printf("d = %e (%d %d)\n", d, i, j);} else intg += det(D, k, k)/rk; r2m = r2