Try out NAG Library functions

Explore NAG maths and stats routines with interactive demos
Function ID
S17DCF
Name
nagf_specfun_bessel_y_complex
Description
Bessel functions Yν+az, reala0, complex z, ν=0,1,2,
Keywords
Bessel function
    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

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

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,')'), &
I4)
End Program s17dcfe

The NAG Library
The world’s largest collection of robust, documented, tested and maintained numerical algorithms.