Branch Coverage

svdutil.c
Criterion Covered Total %
branch 100 240 41.6


line true false branch
75 3 3 if (empty) a = (__SVDLIBC_LONG *) calloc(size, sizeof(__SVDLIBC_LONG));
77 0 6 if (!a) {
86 50 193 if (empty) a = (double *) calloc(size, sizeof(double));
88 0 243 if (!a) {
129 0 0 if (numPipes >= MAX_PIPES) svd_error("Too many pipes open");
135 0 0 for (i = 0; i < numPipes && Pipe[i] != p; i++);
0 0 for (i = 0; i < numPipes && Pipe[i] != p; i++);
136 0 0 if (i == numPipes) return FALSE;
144 0 0 if ((pipe = popen(pipeName, mode))) registerPipe(pipe);
156 0 0 if (!(file = svd_readFile(filename)))
164 0 0 if (ls < lt) return FALSE;
174 0 0 if (!strcmp(fileName, "-"))
178 0 0 if (fileName[0] == '|')
182 0 0 if (stringEndsIn(fileName, ".gz") || stringEndsIn(fileName, ".Z")) {
0 0 if (stringEndsIn(fileName, ".gz") || stringEndsIn(fileName, ".Z")) {
183 0 0 if (!stat(fileName, &statbuf))
188 0 0 if (stringEndsIn(fileName, ".bz") || stringEndsIn(fileName, ".bz2")) {
0 0 if (stringEndsIn(fileName, ".bz") || stringEndsIn(fileName, ".bz2")) {
189 0 0 if (!stat(fileName, &statbuf))
194 0 0 if (!stat(fileName, &statbuf))
198 0 0 if (!stat(fileBuf, &statbuf))
202 0 0 if (!stat(fileBuf, &statbuf))
206 0 0 if (!stat(fileBuf, &statbuf))
210 0 0 if (!stat(fileBuf, &statbuf))
218 0 0 const char *op = (append) ? ">>" : ">";
219 0 0 if (stringEndsIn(fileName, ".bz2") || stringEndsIn(fileName, ".bz"))
0 0 if (stringEndsIn(fileName, ".bz2") || stringEndsIn(fileName, ".bz"))
221 0 0 else if (stringEndsIn(fileName, ".Z"))
230 0 0 if (!strcmp(fileName, "-"))
234 0 0 if (fileName[0] == '|')
238 0 0 if (stringEndsIn(fileName, ".gz") || stringEndsIn(fileName, ".Z") ||
239 0 0 stringEndsIn(fileName, ".bz") || stringEndsIn(fileName, ".bz2"))
241 0 0 return (append) ? fopen(fileName, "a") : fopen(fileName, "w");
246 0 0 if (file == stdin || file == stdout) return;
0 0 if (file == stdin || file == stdout) return;
247 0 0 if (isPipe(file)) pclose(file);
254 0 0 if (fread(&x, sizeof(int), 1, file) == 1) {
265 0 0 if (fread(&x, sizeof(int), 1, file) == 1) {
276 0 0 if (fwrite(&y, sizeof(int), 1, file) != 1) return TRUE;
283 0 0 if (fwrite(&y, sizeof(int), 1, file) != 1) return TRUE;
292 180 0 if ((a>=0.0 && b>=0.0) || (a<0.0 && b<0.0))return(a);
100 80 if ((a>=0.0 && b>=0.0) || (a<0.0 && b<0.0))return(a);
0 100 if ((a>=0.0 && b>=0.0) || (a<0.0 && b<0.0))return(a);
0 0 if ((a>=0.0 && b>=0.0) || (a<0.0 && b<0.0))return(a);
300 170 640 return (a > b) ? a : b;
307 670 190 return (a < b) ? a : b;
331 117 0 if (n <= 0 || incx == 0) return;
0 117 if (n <= 0 || incx == 0) return;
332 0 117 if (incx < 0) dx += (-n+1) * incx;
333 762 117 for (i=0; i < n; i++) {
347 60 0 if (n <= 0 || incx == 0 || incy == 0 || da == 0.0) return;
60 0 if (n <= 0 || incx == 0 || incy == 0 || da == 0.0) return;
60 0 if (n <= 0 || incx == 0 || incy == 0 || da == 0.0) return;
0 60 if (n <= 0 || incx == 0 || incy == 0 || da == 0.0) return;
348 60 0 if (incx == 1 && incy == 1)
60 0 if (incx == 1 && incy == 1)
349 420 60 for (i=0; i < n; i++) *dy++ = da * (*dx++);
352 0 0 if (incx < 0) dx += (-n+1) * incx;
353 0 0 if (incy < 0) dy += (-n+1) * incy;
354 0 0 for (i=0; i < n; i++) {
370 560 0 if (n <= 0 || incx == 0 || incy == 0) return;
560 0 if (n <= 0 || incx == 0 || incy == 0) return;
0 560 if (n <= 0 || incx == 0 || incy == 0) return;
371 560 0 if (incx == 1 && incy == 1)
520 40 if (incx == 1 && incy == 1)
372 3640 520 for (i=0; i < n; i++) *dy++ = *dx++;
375 0 40 if (incx < 0) dx += (-n+1) * incx;
376 40 0 if (incy < 0) dy += (-n+1) * incy;
377 220 40 for (i=0; i < n; i++) {
394 364 0 if (n <= 0 || incx == 0 || incy == 0) return(0.0);
364 0 if (n <= 0 || incx == 0 || incy == 0) return(0.0);
0 364 if (n <= 0 || incx == 0 || incy == 0) return(0.0);
396 364 0 if (incx == 1 && incy == 1)
364 0 if (incx == 1 && incy == 1)
397 2548 364 for (i=0; i < n; i++) dot_product += (*dx++) * (*dy++);
399 0 0 if (incx < 0) dx += (-n+1) * incx;
400 0 0 if (incy < 0) dy += (-n+1) * incy;
401 0 0 for (i=0; i < n; i++) {
417 637 0 if (n <= 0 || incx == 0 || incy == 0 || da == 0.0) return;
637 0 if (n <= 0 || incx == 0 || incy == 0 || da == 0.0) return;
637 0 if (n <= 0 || incx == 0 || incy == 0 || da == 0.0) return;
0 637 if (n <= 0 || incx == 0 || incy == 0 || da == 0.0) return;
418 637 0 if (incx == 1 && incy == 1)
637 0 if (incx == 1 && incy == 1)
419 4459 637 for (i=0; i < n; i++) {
424 0 0 if (incx < 0) dx += (-n+1) * incx;
425 0 0 if (incy < 0) dy += (-n+1) * incy;
426 0 0 for (i=0; i < n; i++) {
442 10 20 if (!igap) return;
444 80 20 for (i = igap; i < n; i++) {
447 80 0 while (j >= 0 && array1[j] > array1[index]) {
0 80 while (j >= 0 && array1[j] > array1[index]) {
470 50 0 if (n <= 0 || incx == 0 || incy == 0) return;
50 0 if (n <= 0 || incx == 0 || incy == 0) return;
0 50 if (n <= 0 || incx == 0 || incy == 0) return;
471 50 0 if (incx == 1 && incy == 1) {
50 0 if (incx == 1 && incy == 1) {
472 150 50 for (i=0; i < n; i++) {
479 0 0 if (incx < 0) dx += (-n+1) * incx;
480 0 0 if (incy < 0) dy += (-n+1) * incy;
481 0 0 for (i=0; i < n; i++) {
499 0 50 if (n < 1) return(-1);
500 10 40 if (n == 1) return(0);
501 0 40 if (incx == 0) return(-1);
503 0 40 if (incx < 0) ix = (-n+1) * incx;
508 110 40 for (i=1; i < n; i++) {
512 0 110 if (dtemp > dmax) {
533 762 127 for (i = 0; i < A->rows; i++) temp[i] = 0.0;
535 889 127 for (i = 0; i < A->cols; i++) {
537 2794 889 for (j = pointr[i]; j < end; j++)
541 889 127 for (i = 0; i < A->cols; i++) {
543 2794 889 for (j = pointr[i]; j < end; j++)
562 399 57 for (i = 0; i < A->cols; i++) {
564 1254 399 for (j = pointr[i]; j < end; j++)
607 1 69 if (!m2) {
625 40 30 if (*iy > mic) *iy = (*iy - m2) - m2;
631 40 30 if (*iy / 2 > m2) *iy = (*iy - m2) - m2;
634 30 40 if (*iy < 0) *iy = (*iy + m2) + m2;
657 800 0 if (p != 0.0) {
661 1500 800 while (t != 4.0) {