/* nag_bessel_k0_scaled_vector (s18cqc) 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; Integer *ivalid; NagError fail; INIT_FAIL(fail); /* Skip heading in data file */ scanf("%*[^\n]"); printf("nag_bessel_k0_scaled_vector (s18cqc) Example Program Results\n"); printf("\n"); printf(" x f ivalid\n"); printf("\n"); scanf("%ld", &n); scanf("%*[^\n]"); /* Allocate memory */ if (!(x = NAG_ALLOC(n, double)) || !(f = NAG_ALLOC(n, double)) || !(ivalid = NAG_ALLOC(n, Integer))) { printf("Allocation failure\n"); exit_status = -1; goto END; } for (i=0; i