Try out NAG Library functions

Explore NAG maths and stats routines with interactive demos
Function ID
Bessel functions Yν+az, reala0, complex z, ν=0,1,2,
Bessel function
The example data reflects that shown in the "Example" section of the routine documentation. You can change this here to try alternative inputs. The formatting will need to be kept as it is here, otherwise the program is likely to fail to run correctly.

Please note that incompatible data will however cause the example output to display an error message. These error messages are fully explained in the Routine document
    Program s17dcfe

!     S17DCF Example Program Text

!     Mark 26.1 Release. NAG Copyright 2016.

!     .. Use Statements ..
      Use nag_library, Only: nag_wp, s17dcf
!     .. Implicit None Statement ..
      Implicit None
!     .. Parameters ..
      Integer, Parameter               :: n = 2, nin = 5, nout = 6
!     .. Local Scalars ..
      Complex (Kind=nag_wp)            :: z
      Real (Kind=nag_wp)               :: fnu
      Integer                          :: ifail, ioerr, nz
      Character (1)                    :: scal
!     .. Local Arrays ..
      Complex (Kind=nag_wp)            :: cwrk(n), cy(n)
!     .. Executable Statements ..
      Write (nout,*) 'S17DCF Example Program Results'

!     Skip heading in data file
      Read (nin,*)

      Write (nout,*)
      Write (nout,99999) 'Calling with N =', n
      Write (nout,*)
      Write (nout,*)                                                           &
        '   FNU            Z        SCAL       CY(1)              CY(2)',      &
        '        NZ'
      Write (nout,*)

data: Do
        Read (nin,*,Iostat=ioerr) fnu, z, scal

        If (ioerr<0) Then
          Exit data
        End If

        ifail = 0
        Call s17dcf(fnu,z,n,scal,cy,nz,cwrk,ifail)

        Write (nout,99998) fnu, z, scal, cy(1), cy(2), nz
      End Do data

99999 Format (1X,A,I2)
99998 Format (1X,F7.4,'  (',F7.3,',',F7.3,')   ',A,2('  (',F7.3,',',F7.3,')'), &
    End Program s17dcfe
The NAG Library
The world’s largest collection of robust, documented, tested and maintained numerical algorithms.
Learn more here or contact us for purchasing information