/* nag_jacobian_theta (s21ccc) Example Program. * * Copyright 2000 Numerical Algorithms Group. * * NAG C Library * * Mark 6, 2000. */ #include #include #include #include int main(void) { double q, x, y; Integer exit_status=0; Integer k; NagError fail; INIT_FAIL(fail); /* Skip heading in data file */ Vscanf("%*[^\n] "); Vprintf("s21ccc Example Program Results\n"); Vprintf(" k x q y\n"); while (scanf("%ld%lf%lf%*[^\n]", &k, &x, &q) != EOF) { y = s21ccc(k, x, q, &fail); if (fail.code == NE_NOERROR) Vprintf("%2ld %4.1f %4.1f %12.4e\n", k,x,q,y); else { Vprintf("Error from s21ccc.\n%s\n", fail.message); exit_status = 1; goto END; } } END: return exit_status; }