96 for(gpass=1; gpass<=1; gpass++)
102 for(
i=0;
i<=maxmn-1;
i++)
104 for(
j=0;
j<=maxmn-1;
j++)
113 testsvdproblem<Precision>(a,
i,
j, materr, orterr, othererr, wsorted, wfailed);
120 for(
i=0;
i<=maxmn-1;
i++)
127 for(
i=1;
i<=maxmn;
i++)
131 testsvdproblem<Precision>(a,
i,
j, materr, orterr, othererr, wsorted, wfailed);
136 for(
j=0;
j<=maxmn-1;
j++)
143 for(
j=1;
j<=maxmn;
j++)
145 testsvdproblem<Precision>(a,
i,
j, materr, orterr, othererr, wsorted, wfailed);
156 for(
i=0;
i<=
m-1;
i++)
158 for(
j=0;
j<=n-1;
j++)
163 testsvdproblem<Precision>(a,
m, n, materr, orterr, othererr, wsorted, wfailed);
174 for(pass=1; pass<=2; pass++)
177 testsvdproblem<Precision>(a,
m, n, materr, orterr, othererr, wsorted, wfailed);
179 testsvdproblem<Precision>(a,
m, n, materr, orterr, othererr, wsorted, wfailed);
181 testsvdproblem<Precision>(a,
m, n, materr, orterr, othererr, wsorted, wfailed);
191 waserrors = materr>threshold || orterr>threshold || othererr>threshold || !wsorted || failr>failthreshold;
194 printf(
"TESTING SVD DECOMPOSITION\n");
195 printf(
"SVD decomposition error: %5.3le\n",
197 printf(
"SVD orthogonality error: %5.3le\n",
199 printf(
"SVD with different parameters error: %5.3le\n",
201 printf(
"Singular values order: ");
210 printf(
"Always converged: ");
218 printf(
"Fail ratio: %5.3lf\n",
221 printf(
"Threshold: %5.3le\n",
225 printf(
"TEST FAILED\n");
229 printf(
"TEST PASSED\n");