public static void lerch_test( ) //****************************************************************************80 // // Purpose: // // LERCH_TEST tests LERCH. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 23 May 2007 // // Author: // // John Burkardt // { double a = 0; double fx = 0; int s = 0; double z = 0; Console.WriteLine(""); Console.WriteLine("LERCH_TEST:"); Console.WriteLine(" LERCH evaluates the Lerch function."); Console.WriteLine(""); Console.WriteLine(" Z S A Lerch Lerch"); Console.WriteLine(" Tabulated Computed"); Console.WriteLine(""); int n_data = 0; for ( ; ;) { Burkardt.Values.Lerch.lerch_values(ref n_data, ref z, ref s, ref a, ref fx); if (n_data == 0) { break; } double fx2 = Lerch.lerch(z, s, a); Console.WriteLine(" " + z.ToString(CultureInfo.InvariantCulture).PadLeft(8) + " " + s.ToString(CultureInfo.InvariantCulture).PadLeft(4) + " " + a.ToString(CultureInfo.InvariantCulture).PadLeft(8) + " " + fx.ToString(CultureInfo.InvariantCulture).PadLeft(14) + " " + fx2.ToString(CultureInfo.InvariantCulture).PadLeft(14) + ""); } }
public static void lerch_values_test() //****************************************************************************80 // // Purpose: // // LERCH_VALUES_TEST tests LERCH_VALUES. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 13 June 2007 // // Author: // // John Burkardt // { double a = 0; double fx = 0; int s = 0; double z = 0; Console.WriteLine(""); Console.WriteLine("LERCH_VALUES_TEST:"); Console.WriteLine(" LERCH_VALUES returns values of"); Console.WriteLine(" the Lerch transcendent function."); Console.WriteLine(""); Console.WriteLine(" Z S A Fx"); Console.WriteLine(""); int n_data = 0; for (;;) { Lerch.lerch_values(ref n_data, ref z, ref s, ref a, ref fx); if (n_data == 0) { break; } Console.WriteLine(" " + z.ToString("0.################").PadLeft(24) + " " + s.ToString().PadLeft(6) + " " + a.ToString(CultureInfo.InvariantCulture).PadLeft(12) + " " + fx.ToString("0.################").PadLeft(24) + ""); } }