Пример #1
0
        static void Test_home(double xo, double xn, double a, double b, int n, string path)
        {
            StreamWriter SW    = new StreamWriter(path);
            MyETF        ET_Fx = new MyETF(xo, xn, n, My_Fx, My_d1Fx, My_d2Fx, "- Newton -");

            ET_Fx.Roots_correction(1.0E-12);

            SW.WriteLine(ET_Fx.Table_of_Roots("--- All Roots ---"));

            SW.WriteLine("\r\n Точки пересечения траекторий");
            Point_xf xy;

            for (int i = 0; i < ET_Fx.Roots.Count; i++)
            {
                xy = new Point_xf(ET_Fx.Roots[i].X, My_f1(ET_Fx.Roots[i].X));
                SW.WriteLine($"{i,3}" + xy.ToPrint());
            }
            SW.Close();
        }
Пример #2
0
        static void Test(double a, double b, double s)
        {
            StreamWriter SW    = new StreamWriter("MAC_CheckTask_1_5.txt");
            MyETF        ET_Fx = new MyETF(0.0, 4.0, 200, Fx, d1Fx, d2Fx, "- Newton -");

            ET_Fx.Roots_correction(1.0E-12);

            SW.WriteLine(ET_Fx.Table_of_Roots("--- All Roots ---"));

            SW.WriteLine("\r\n Точки пересечения траекторий");
            Point_xf xy;

            for (int i = 0; i < ET_Fx.Roots.Count; i++)
            {
                xy = new Point_xf(ET_Fx.Roots[i].X, f1(ET_Fx.Roots[i].X));
                SW.WriteLine($"{i,3}" + xy.ToPrint());
            }
            SW.Close();
        }