| 40 | #endif |
| 41 | |
| 42 | int compare(double a, double b, const char *n) { |
| 43 | if (fabs(a - b) > fabs(b) * tol && fabs(b) > thresh) { |
| 44 | master_printf("%s differs by\t%g out of\t%g\n", n, a - b, b); |
| 45 | master_printf("This gives a fractional error of %g\n", fabs(a - b) / fabs(b)); |
| 46 | return 0; |
| 47 | } |
| 48 | else { return 1; } |
| 49 | } |
| 50 | |
| 51 | int compare_point(fields &f1, fields &f2, const vec &p) { |
| 52 | monitor_point m1, m_test; |