dbesks.f 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. *DECK DBESKS
  2. SUBROUTINE DBESKS (XNU, X, NIN, BK)
  3. C***BEGIN PROLOGUE DBESKS
  4. C***PURPOSE Compute a sequence of modified Bessel functions of the
  5. C third kind of fractional order.
  6. C***LIBRARY SLATEC (FNLIB)
  7. C***CATEGORY C10B3
  8. C***TYPE DOUBLE PRECISION (BESKS-S, DBESKS-D)
  9. C***KEYWORDS FNLIB, FRACTIONAL ORDER, MODIFIED BESSEL FUNCTION,
  10. C SEQUENCE OF BESSEL FUNCTIONS, SPECIAL FUNCTIONS,
  11. C THIRD KIND
  12. C***AUTHOR Fullerton, W., (LANL)
  13. C***DESCRIPTION
  14. C
  15. C DBESKS computes a sequence of modified Bessel functions of the third
  16. C kind of order XNU + I at X, where X .GT. 0, XNU lies in (-1,1),
  17. C and I = 0, 1, ... , NIN - 1, if NIN is positive and I = 0, 1, ... ,
  18. C NIN + 1, if NIN is negative. On return, the vector BK(.) contains
  19. C the results at X for order starting at XNU. XNU, X, and BK are
  20. C double precision. NIN is an integer.
  21. C
  22. C***REFERENCES (NONE)
  23. C***ROUTINES CALLED D1MACH, DBSKES, XERMSG
  24. C***REVISION HISTORY (YYMMDD)
  25. C 770601 DATE WRITTEN
  26. C 890531 Changed all specific intrinsics to generic. (WRB)
  27. C 890831 Modified array declarations. (WRB)
  28. C 890831 REVISION DATE from Version 3.2
  29. C 891214 Prologue converted to Version 4.0 format. (BAB)
  30. C 900315 CALLs to XERROR changed to CALLs to XERMSG. (THJ)
  31. C***END PROLOGUE DBESKS
  32. DOUBLE PRECISION XNU, X, BK(*), EXPXI, XMAX, D1MACH
  33. SAVE XMAX
  34. DATA XMAX / 0.D0 /
  35. C***FIRST EXECUTABLE STATEMENT DBESKS
  36. IF (XMAX.EQ.0.D0) XMAX = -LOG (D1MACH(1))
  37. C
  38. IF (X .GT. XMAX) CALL XERMSG ('SLATEC', 'DBESKS',
  39. + 'X SO BIG BESSEL K UNDERFLOWS', 1, 2)
  40. C
  41. CALL DBSKES (XNU, X, NIN, BK)
  42. C
  43. EXPXI = EXP (-X)
  44. N = ABS (NIN)
  45. DO 20 I=1,N
  46. BK(I) = EXPXI * BK(I)
  47. 20 CONTINUE
  48. C
  49. RETURN
  50. END