besj0(3f) - [M_bessel] calculates the Bessel function J(X) of order zero.
Synopsis
Description
Options
Authors
Example
function besj0(xx)
Series evaluation is used for small arguments, recurrence techniques are used for midrange, and Hankel-S Asymptotic Expansion is used for large arguments. Accuracy is between thirteen and fourteen correct significant figures except for large arguments where the accuracy eventually falls to eight figures.
XX may be any doubleprecision argument.
Originally from
Sandia Mathematical Program Library Applied Mathematics Division 2642 Sandia Laboratories P. O. box 5800 Albuquerque, new Mexico 87115 Control Data 6600 Version 5.1, 10 December 1973Written by Ronald D. Halbgewachs, October 1,1971.
minor changes have been made to improve the portability or to confirm to modern Fortran standards
Sample program:
program demo_besj0 use, intrinsic :: iso_fortran_env, only : real32, real64, real128 use, intrinsic :: iso_fortran_env, only : wp=>real64 use M_bessel, only: besj0 implicit none real(kind=wp) :: y, z real(kind=wp),parameter :: x(*)=[-huge(0.0_wp),0.0_wp,-100.0_wp, & & 30000.0_wp,huge(0.0_wp)] integer :: i do i=1,size(x) y = bessel_j0(x(i)) z = besj0(x(i)) write(*,*)x(i),y,z enddo end program demo_besj0
Nemo Release 3.1 | besj0 (3) | February 23, 2025 |