/* Last edited on 2019-12-04 11:03:51 by jstolfi */ /* Tests special values of the erf and erfc functions. */ #include #include #include void show(double x); void show(double x) { double y = erf(x); double z = erfc(x); fprintf(stdout, "x = %25.17le erf(x) = %25.17le erfc(x) = %25.17le sum = %25.17le\n", x, y, z, y+z); } int main(int argc, char **argv) { double x; double xmax = 7; for (x = -xmax; x <= +xmax; x += 0.5) { show(x); } return 0; }