/* nag_arccosh (s11acc) Example Program. * * Copyright 1989 Numerical Algorithms Group. * * Mark 2 revised, 1992. */ #include #include #include #include int main(void) { double x, y; /* Skip heading in data file */ Vscanf("%*[^\n]"); Vprintf("nag_arccosh (s11acc) Example Program Results\n"); Vprintf(" x y\n"); while (scanf("%lf", &x) != EOF) { /* nag_arccosh (s11acc). * Inverse hyperbolic cosine, arccosh x */ y = nag_arccosh(x, NAGERR_DEFAULT); Vprintf("%12.3e%12.3e\n", x, y); } return EXIT_SUCCESS; }