Skip to content

Commit

Permalink
debugging in cpoly
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Feb 13, 2024
1 parent cbdf65b commit b9c81b5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Basic/Math/cpoly.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ char *cpoly(double opr[], double opi[], int degree,
}

while (!failreason) {
fprintf(stderr, "NOFAIL yet\n");

/* Start the algorithm for one zero */
if (nn < 3) {
Expand Down Expand Up @@ -318,6 +319,14 @@ char *cpoly(double opr[], double opi[], int degree,
if (pc) free(pc);
/* The zerofinder has failed on two major passes
Return empty handed */
if (failreason) {
fprintf(stderr, "FAIL data (got to %d):\n", nn);
int i;
for (i=0; i<degree+1; i++) {
fprintf(stderr, " %20g%+20gi\n", opr[i], opi[i]);
}
fflush(stderr);
}
return failreason;
}

Expand Down

0 comments on commit b9c81b5

Please sign in to comment.