besks.f 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. *DECK BESKS
  2. SUBROUTINE BESKS (XNU, X, NIN, BK)
  3. C***BEGIN PROLOGUE BESKS
  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 SINGLE 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 BESKS 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.
  20. C
  21. C***REFERENCES (NONE)
  22. C***ROUTINES CALLED BESKES, R1MACH, XERMSG
  23. C***REVISION HISTORY (YYMMDD)
  24. C 770601 DATE WRITTEN
  25. C 890531 Changed all specific intrinsics to generic. (WRB)
  26. C 890531 REVISION DATE from Version 3.2
  27. C 891214 Prologue converted to Version 4.0 format. (BAB)
  28. C 900315 CALLs to XERROR changed to CALLs to XERMSG. (THJ)
  29. C 900326 Removed duplicate information from DESCRIPTION section.
  30. C (WRB)
  31. C***END PROLOGUE BESKS
  32. DIMENSION BK(*)
  33. SAVE XMAX
  34. DATA XMAX / 0.0 /
  35. C***FIRST EXECUTABLE STATEMENT BESKS
  36. IF (XMAX.EQ.0.0) XMAX = -LOG (R1MACH(1))
  37. C
  38. IF (X .GT. XMAX) CALL XERMSG ('SLATEC', 'BESKS',
  39. + 'X SO BIG BESSEL K UNDERFLOWS', 1, 2)
  40. C
  41. CALL BESKES (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