intW m = new intW(0);
int itmp[] = new int[1];
double tmp[] = new double[1];
LAPACK lapack = LAPACK.getInstance();
intW info = new intW(0);
lapack.dsyevr(jobv, range, uplo, n, rx, n,
vl, vu, il, iu, abstol, m, rvalues,
rz, n, isuppz,
tmp, lwork, itmp, liwork, info);
if (info.val != 0)
throw new EvalException("error code %d from Lapack routine '%s'", info, "dsyevr");
lwork = (int) tmp[0];
liwork = itmp[0];
double work[] = new double[lwork];
int iwork[] = new int[liwork];
lapack.dsyevr(jobv, range, uplo, n, rx, n,
vl, vu, il, iu, abstol, m, rvalues,
rz, n, isuppz,
work, lwork, iwork, liwork, info);
if (info.val != 0)
throw new EvalException("error code %d from Lapack routine '%s'", info, "dsyevr");