/* nag_fresnel_c_vector (s20arc) Example Program. * * Copyright 2011, Numerical Algorithms Group. * * Mark 23 2011. */ #include #include #include #include int main(void) { Integer exit_status = 0; Integer i, n; double *f, *x; NagError fail; INIT_FAIL(fail); /* Skip heading in data file */ scanf("%*[^\n]"); printf("nag_fresnel_c_vector (s20arc) Example Program Results\n"); printf("\n"); printf(" x f\n"); printf("\n"); scanf("%ld", &n); scanf("%*[^\n]"); /* Allocate memory */ if (!(x = NAG_ALLOC(n, double)) || !(f = NAG_ALLOC(n, double))) { printf("Allocation failure\n"); exit_status = -1; goto END; } for (i=0; i