private static void test10() //**************************************************************************** // // Purpose: // // TEST10 tests STOCHASTIC_INTEGRAL_ITO. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 28 September 2012 // // Author: // // John Burkardt // { double error = 0; double estimate = 0; double exact = 0; int i; Console.WriteLine(""); Console.WriteLine("TEST10:"); Console.WriteLine(" Estimate the Ito integral of W(t) dW over [0,1]."); Console.WriteLine(""); Console.WriteLine(" Abs Rel"); Console.WriteLine(" N Exact Estimate Error Error"); Console.WriteLine(""); int n = 100; int seed = 123456789; typeMethods.r8vecNormalData data = new(); for (i = 1; i <= 7; i++) { Integrals.stochastic_integral_ito(n, ref data, ref seed, ref estimate, ref exact, ref error); Console.WriteLine(" " + n.ToString().PadLeft(8) + " " + exact.ToString(CultureInfo.InvariantCulture).PadLeft(16) + " " + estimate.ToString(CultureInfo.InvariantCulture).PadLeft(16) + " " + error.ToString(CultureInfo.InvariantCulture).PadLeft(16) + " " + (error / exact).ToString(CultureInfo.InvariantCulture).PadLeft(16) + ""); n *= 4; } }