public static void hermite_poly_phys_test() //****************************************************************************80 // // Purpose: // // HERMITE_POLY_PHYS_TEST tests HERMITE_POLY_PHYS. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 23 May 2007 // // Author: // // John Burkardt // { const int N_MAX = 12; double fx = 0; double[] fx2 = new double[N_MAX + 1]; int n = 0; int n_data = 0; double x = 0; Console.WriteLine(""); Console.WriteLine("HERMITE_POLY_PHYS_TEST:"); Console.WriteLine(" HERMITE_POLY_PHYS evaluates the physicist's Hermite polynomial."); Console.WriteLine(""); Console.WriteLine(" N X Exact F H(N)(X)"); Console.WriteLine(""); n_data = 0; for (;;) { Burkardt.Values.Hermite.hermite_poly_phys_values(ref n_data, ref n, ref x, ref fx); if (n_data == 0) { break; } Hermite.hermite_poly_phys(n, x, ref fx2); Console.WriteLine(" " + n.ToString(CultureInfo.InvariantCulture).PadLeft(8) + " " + x.ToString(CultureInfo.InvariantCulture).PadLeft(8) + " " + fx.ToString(CultureInfo.InvariantCulture).PadLeft(14) + " " + fx2[n].ToString(CultureInfo.InvariantCulture).PadLeft(14) + ""); } }