/* nag_prob_der_landau (g01rtc) Example Program.
 *
 * NAGPRODCODE Version.
 *
 * Copyright 2016 Numerical Algorithms Group.
 *
 * Mark 26, 2016.
 */

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

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

  printf(" nag_prob_der_landau (g01rtc) Example Program Results\n");

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

  /* nag_prob_der_landau (g01rtc).
   * Landau derivative function phi'(lambda)
   */
  y = nag_prob_der_landau(x);

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

  return exit_status;
}