<BESSEL_JN Example Program 1>

Program bessel_jn_example_1
  Implicit None
  Integer i
  Real :: x(8) = [ (i*0.5,i=1,8) ]
  Print 1, x
  ! Elemental over X.
  Print 1, Bessel_JN(3,x)
1 Format(999F9.3)
End Program

■ Execution Results

    0.500    1.000    1.500    2.000    2.500    3.000    3.500    4.000
    0.003    0.020    0.061    0.129    0.217    0.309    0.387    0.430

<BESSEL_JN Example Program 2>

Program bessel_jn_example_2
  Implicit None
  Integer i
  Real :: x = 2.5
  Integer :: n(8) = [ 1,3,5,7,11,13,17,19 ]
  Print 1, (n(i),x,i=1,8)
1 Format(999(1X,'J',I2.2,'(',F3.1,')',:))
  ! Elemental over N.
  Print 2, Bessel_JN(n,x)
2 Format(999F9.5)
End Program

■ Execution Results

 J01(2.5) J03(2.5) J05(2.5) J07(2.5) J11(2.5) J13(2.5) J17(2.5) J19(2.5)
  0.49709  0.21660  0.01950  0.00078  0.00000  0.00000  0.00000  0.00000

<BESSEL_JN Example Program 3>

Program bessel_jn_example_3
  Implicit None
  Integer i
  Real :: x = 2.5
  Print 1, (i,x,i=1,7)
1 Format(999(2X,'J',I1,'(',F3.1,')',:))
  ! Transformational.
  Print 2, Bessel_JN(1,7,x)
2 Format(999F9.5)
End Program

■ Execution Results

  J1(2.5)  J2(2.5)  J3(2.5)  J4(2.5)  J5(2.5)  J6(2.5)  J7(2.5)
  0.49709  0.44606  0.21660  0.07378  0.01950  0.00422  0.00077