示例#1
0
static double racmp(R *a, R *b, int n, const char *test, double tol)
{
     double d = raerror(a, b, n);
     if (d > tol) {
	  fprintf(stderr, "Found relative error %e (%s)\n", d, test);
	  {
	       int i;
	       for (i = 0; i < n; ++i)
		    fprintf(stderr, "%8d %16.12f   %16.12f\n", i, 
			    (double) a[i],
			    (double) b[i]);
	  }
	  exit(EXIT_FAILURE);
     }
     return d;
}
示例#2
0
static double racmp(R *a, R *b, int n, const char *test, double tol)
{
     double d = raerror(a, b, n);
     if (d > tol) {
	  ovtpvt_err("Found relative error %e (%s)\n", d, test);
	  {
	       int i, N;
	       N = n > 300 && verbose <= 2 ? 300 : n;
	       for (i = 0; i < N; ++i)
		    ovtpvt_err("%8d %16.12f   %16.12f\n", i, 
			       (double) a[i],
			       (double) b[i]);
	  }
	  bench_exit(EXIT_FAILURE);
     }
     return d;
}