/* nag_elliptic_integral_complete_E (s21bjc) Example Program. * * Copyright 2008, Numerical Algorithms Group. * * Mark 9, 2009. */ /* Pre-processor includes */ #include #include #include #include int main(void) { /*Integer scalar and array declarations */ Integer exit_status = 0; Integer ix; /*Double scalar and array declarations */ double dm, E; NagError fail; INIT_FAIL(fail); printf("%s\n", "nag_elliptic_integral_complete_E (s21bjc) Example Program Results"); printf("\n"); printf("%s\n", " dm nag_elliptic_integral_complete_E"); printf("\n"); for (ix = 1; ix <= 3; ix++) { dm = ix*0.250e0; /* * nag_elliptic_integral_complete_E (s21bjc) * Complete elliptic integral of 2nd kind, Legendre form, E(m) */ E = nag_elliptic_integral_complete_E(dm, &fail); if (fail.code != NE_NOERROR) { printf("Error from " "nag_elliptic_integral_complete_E (s21bjc).\n%s\n", fail.message); exit_status = 1; goto END; } printf("%7.2f%12.4f\n", dm, E); } END: return exit_status; }