Example: The Bessel Functions

The Bessel functions I, J, and K are exercised for orders 0, 1, 2, and 3 at argument 10.e0.
using System;
using Imsl.Math;

public class BesselEx1
{
    public static void  Main(String[] args)
    {
        double x = 10e0;
        int hiorder = 4;
        //    Exercise some of the Bessel functions with argument 10.0
        double[] bi = Bessel.I(x, hiorder);
        double[] bj = Bessel.J(x, hiorder);
        double[] bk = Bessel.K(x, hiorder);
        
        Console.Out.WriteLine("Order     Bessel.I               " + 
                              "Bessel.J               Bessel.K");
        for (int i = 0; i < 4; i++)
        {
            Console.Out.WriteLine(i + "     " + bi[i] + "     " + bj[i]
                                    + "     " + bk[i]);
        }
        Console.Out.WriteLine();
    }
}

Output

Order     Bessel.I               Bessel.J               Bessel.K
0     2815.71662846626     -0.245935764451348     1.77800623161677E-05
1     2670.98830370126     0.0434727461688615     1.86487734538256E-05
2     2281.518967726     0.254630313685121     2.15098170069328E-05
3     1758.38071661085     0.0583793793051867     2.72527002565987E-05


Link to C# source.