Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

BESSEL_JN

Elemental and Transformational Intrinsic Functions (Generic): Compute Bessel functions of the first kind.

Elemental function: result = BESSEL_JN (n, x)

Transformational function: result = BESSEL_JN (n1, n2, x)

n, n1, n2

(Input) Must be of type integer and nonnegative.

x

(Input) Must be of type real.

Results

The result type and kind are the same as x.

The result of BESSEL_JN (n, x) is scalar. The result value of BESSEL_JN (n , x) is a processor-dependent approximation to the Bessel function of the first kind and order n of x.

The result of BESSEL_JN (n1, n2, x) is a rank-one array with extent MAX (n2 - n1 + 1, 0). Element i of the result value of BESSEL_JN (n1, n2, x) is a processor-dependent approximation to the Bessel function of the first kind and order n1 + i - 1 of x.

Example

BESSEL_JN (2, 1.0) has the approximate value 0.115.

Consider the following program Bessel.90:

   real :: z (6) = [0:5]/5.		  ! 0.0 through 1.0 by 0.2
   print *, z
   print *, bessel_jn (2, 1.0)	  ! scalar argument, answer about 0.115
   print *, bessel_jn (1, z)		  ! elemental
   print *, bessel_jn (1, 4, 1.0)  ! orders 1 thru 4 on a scalar
   end

Compile bessel.f90 and execute the result:

> ifx Bessel.f90 -o Bessel
> bessel

The above commands produce the following result:

  0.0000000E+00  0.2000000      0.4000000      0.6000000      0.8000000      1.000000
  0.1149035
  0.0000000E+00  9.9500835E-02  0.1960266      0.2867010      0.3688421      0.4400506
  0.4400506      0.1149035      1.9563355E-02  2.4766389E-03