***********80
! CPDLA computes complex parabolic cylinder function Dn(z) for large argument.
Licensing:
This routine is copyrighted by Shanjie Zhang and Jianming Jin. However,
they give permission to incorporate this routine into a user program
provided that the copyright is acknowledged.
Modified:
07 July 2012
Author:
Shanjie Zhang, Jianming Jin
Reference:
Shanjie Zhang, Jianming Jin,
Computation of Special Functions,
Wiley, 1996,
ISBN: 0-471-11963-6,
LC: QA351.C45.
Parameters:
Input, integer N, the order.
Input, complex ( kind = 8 ) Z, the argument.
Output, complex ( kind = 8 ) CDN, the function value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4) | :: | n | ||||
complex(kind=8) | :: | z | ||||
complex(kind=8) | :: | cdn |
subroutine cpdla ( n, z, cdn ) !****************************************************************************80 ! !! CPDLA computes complex parabolic cylinder function Dn(z) for large argument. ! ! Licensing: ! ! This routine is copyrighted by Shanjie Zhang and Jianming Jin. However, ! they give permission to incorporate this routine into a user program ! provided that the copyright is acknowledged. ! ! Modified: ! ! 07 July 2012 ! ! Author: ! ! Shanjie Zhang, Jianming Jin ! ! Reference: ! ! Shanjie Zhang, Jianming Jin, ! Computation of Special Functions, ! Wiley, 1996, ! ISBN: 0-471-11963-6, ! LC: QA351.C45. ! ! Parameters: ! ! Input, integer N, the order. ! ! Input, complex ( kind = 8 ) Z, the argument. ! ! Output, complex ( kind = 8 ) CDN, the function value. ! implicit none complex ( kind = 8 ) cb0 complex ( kind = 8 ) cdn complex ( kind = 8 ) cr integer ( kind = 4 ) k integer ( kind = 4 ) n complex ( kind = 8 ) z cb0 = z ** n * exp ( -0.25D+00 * z * z ) cr = cmplx ( 1.0D+00, 0.0D+00, kind = 8 ) cdn = cmplx ( 1.0D+00, 0.0D+00, kind = 8 ) do k = 1, 16 cr = -0.5D+00 * cr * ( 2.0D+00 * k - n - 1.0D+00 ) & * ( 2.0D+00 * k - n - 2.0D+00 ) / ( k * z * z ) cdn = cdn + cr if ( abs ( cr ) < abs ( cdn ) * 1.0D-12 ) then exit end if end do cdn = cb0 * cdn return end subroutine cpdla