NAG Library Manual, Mark 27.3
Interfaces:  FL   CL   CPP   AD 

NAG CL Interface Introduction
Example description
/* nag_specfun_ellipint_symm_1_degen (s21bac) Example Program.
 *
 * Copyright 2021 Numerical Algorithms Group.
 *
 * Mark 27.3, 2021.
 */

#include <nag.h>
#include <stdio.h>

int main(void) {
  Integer exit_status = 0;
  double rc, x, y;
  Integer ix;
  NagError fail;

  INIT_FAIL(fail);

  printf(
      "nag_specfun_ellipint_symm_1_degen (s21bac) Example Program Results\n");
  printf("     x      y       nag_specfun_ellipint_symm_1_degen (s21bac)  \n");
  for (ix = 1; ix <= 3; ix++) {
    x = ix * 0.5;
    y = 1.0;
    /* nag_specfun_ellipint_symm_1_degen (s21bac).
     * Degenerate symmetrised elliptic integral of 1st kind
     * R_C(xy)
     */
    rc = nag_specfun_ellipint_symm_1_degen(x, y, &fail);
    if (fail.code != NE_NOERROR) {
      printf("Error from nag_specfun_ellipint_symm_1_degen (s21bac).\n%s\n",
             fail.message);
      exit_status = 1;
      goto END;
    }
    printf("%7.2f%7.2f%12.4f\n", x, y, rc);
  }

END:
  return exit_status;
}