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

NAG CL Interface Introduction
Example description
/* nag_stat_pdf_landau_moment2 (g01qtc) Example Program.
 *
 * Copyright 2024 Numerical Algorithms Group.
 *
 * Mark 30.0, 2024.
 */

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

int main(void) {
  /* Scalars */
  Integer exit_status = 0;
  double x, y;

  printf(" nag_stat_pdf_landau_moment2 (g01qtc) Example Program Results\n");

  /* Skip heading in data file */
  scanf("%*[^\n] ");
  scanf("%lf%*[^\n] ", &x);

  /* nag_stat_pdf_landau_moment2 (g01qtc).
   * Landau second moment function Phi_2(x)
   */
  y = nag_stat_pdf_landau_moment2(x);

  printf("\n   X          Y\n\n");
  printf("  %3.1f   %13.4e\n", x, y);

  return exit_status;
}