--- trunk/OOPSE-1.0/libmdtools/MatVec3.c 2004/07/16 18:58:03 1334 +++ trunk/OOPSE-1.0/libmdtools/MatVec3.c 2004/07/19 16:47:57 1348 @@ -314,10 +314,12 @@ int JacobiN(double **a, int n, double *w, double **v) int JacobiN(double **a, int n, double *w, double **v) { int i, j, k, iq, ip, numPos; + int ceil_half_n; double tresh, theta, tau, t, sm, s, h, g, c, tmp; double bspace[4], zspace[4]; double *b = bspace; double *z = zspace; + // only allocate memory if the matrix is large if (n > 4) @@ -474,7 +476,7 @@ int JacobiN(double **a, int n, double *w, double **v) // are negative of one another (.707,.707,0) and (-.707,-.707,0). This can // reek havoc in hyperstreamline/other stuff. We will select the most // positive eigenvector. - int ceil_half_n = (n >> 1) + (n & 1); + ceil_half_n = (n >> 1) + (n & 1); for (j=0; j