Exemplo n.º 1
0
    public static void bessel_j0_zero_values_test()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    BESSEL_J0_ZERO_VALUES_TEST tests BESSEL_J0_ZERO_VALUES.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    04 January 2016
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        double fx = 0;
        int    k  = 0;

        Console.WriteLine("");
        Console.WriteLine("BESSEL_J0_ZERO_VALUES_TEST:");
        Console.WriteLine("  BESSEL_J0_ZERO_VALUES stores values of zeros of");
        Console.WriteLine("  the Bessel J0 function.");
        Console.WriteLine("");
        Console.WriteLine("       K         X(K)");
        Console.WriteLine("");
        int n_data = 0;

        for (;;)
        {
            Bessel.bessel_j0_zero_values(ref n_data, ref k, ref fx);
            if (n_data == 0)
            {
                break;
            }

            Console.WriteLine("  " + k.ToString(CultureInfo.InvariantCulture).PadLeft(6)
                              + "  " + fx.ToString(CultureInfo.InvariantCulture).PadLeft(24) + "");
        }
    }