private static void inverse_gaussian_cdf_test()

//****************************************************************************80
//
//  Purpose:
//
//    INVERSE_GAUSSIAN_CDF_TEST tests INVERSE_GAUSSIAN_CDF.
//
//  Licensing:
//
//    This code is distributed under the GNU LGPL license.
//
//  Modified:
//
//    07 April 2016
//
//  Author:
//
//    John Burkardt
//
    {
        int i;
        int seed = 123456789;

        Console.WriteLine("");
        Console.WriteLine("INVERSE_GAUSSIAN_CDF_TEST");
        Console.WriteLine("  INVERSE_GAUSSIAN_CDF evaluates the Inverse Gaussian CDF;");
        Console.WriteLine("  INVERSE_GAUSSIAN_PDF evaluates the Inverse Gaussian PDF;");

        const double a = 5.0;
        const double b = 2.0;

        Console.WriteLine("");
        Console.WriteLine("  PDF parameter A =      " + a + "");
        Console.WriteLine("  PDF parameter B =      " + b + "");

        if (!InverseGaussian.inverse_gaussian_check(a, b))
        {
            Console.WriteLine("");
            Console.WriteLine("INVERSE_GAUSSIAN_CDF_TEST - Fatal error!");
            Console.WriteLine("  The parameters are not legal.");
            return;
        }

        Console.WriteLine("");
        Console.WriteLine("       X            PDF           CDF");
        Console.WriteLine("");

        for (i = 1; i <= 10; i++)
        {
            double x   = InverseGaussian.inverse_gaussian_sample(a, b, ref seed);
            double pdf = InverseGaussian.inverse_gaussian_pdf(x, a, b);
            double cdf = InverseGaussian.inverse_gaussian_cdf(x, a, b);

            Console.WriteLine("  "
                              + x.ToString(CultureInfo.InvariantCulture).PadLeft(12) + "  "
                              + pdf.ToString(CultureInfo.InvariantCulture).PadLeft(12) + "  "
                              + cdf.ToString(CultureInfo.InvariantCulture).PadLeft(12) + "");
        }
    }