dbesj.cpp 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705
  1. /* dbesj.f -- translated by f2c (version 20100827).
  2. This file no longer depends on f2c.
  3. */
  4. #include "slatec-internal.hpp"
  5. /* Table of constant values */
  6. integer const c__3 = 3;
  7. integer const c__14 = 14;
  8. integer const c__15 = 15;
  9. integer const c__5 = 5;
  10. integer const c__1 = 1;
  11. integer const c__2 = 2;
  12. int dbesj_(double const *x, double const *alpha, integer const *n, double *y, integer *nz)
  13. {
  14. /* Initialized data */
  15. constexpr double rtwo = 1.34839972492648;
  16. constexpr double pdf = .785398163397448;
  17. constexpr double rttp = .797884560802865;
  18. constexpr double pidt = 1.5707963267949;
  19. constexpr double pp[4] = { 8.72909153935547,.26569393226503, .124578576865586,7.70133747430388e-4 };
  20. constexpr integer inlim = 150;
  21. constexpr double fnulim[2] = { 100.,60. };
  22. /* System generated locals */
  23. integer i__1;
  24. double d__1;
  25. /* Local variables */
  26. integer i__, k;
  27. double s, t;
  28. integer i1, i2;
  29. double s1, s2, t1, t2, ak, ap, fn, sa;
  30. integer kk, in, km;
  31. double sb, ta, tb;
  32. integer is, nn, kt, ns;
  33. double tm, wk[7], tx, xo2, dfn, akm, arg, fnf, fni, gln, ans, dtm,
  34. tfn, fnu, tau, tol, etx, rtx, trx, fnp1, xo2l, sxo2, coef, earg,
  35. relb;
  36. integer ialp;
  37. double rden;
  38. integer iflw;
  39. double slim, temp[3], rtol, elim1, fidal;
  40. integer idalp;
  41. double flgjy, rzden, tolln;
  42. double dalpha;
  43. /* ***BEGIN PROLOGUE DBESJ */
  44. /* ***PURPOSE Compute an N member sequence of J Bessel functions */
  45. /* J/SUB(ALPHA+K-1)/(X), K=1,...,N for non-negative ALPHA */
  46. /* and X. */
  47. /* ***LIBRARY SLATEC */
  48. /* ***CATEGORY C10A3 */
  49. /* ***TYPE DOUBLE PRECISION (BESJ-S, DBESJ-D) */
  50. /* ***KEYWORDS J BESSEL FUNCTION, SPECIAL FUNCTIONS */
  51. /* ***AUTHOR Amos, D. E., (SNLA) */
  52. /* Daniel, S. L., (SNLA) */
  53. /* Weston, M. K., (SNLA) */
  54. /* ***DESCRIPTION */
  55. /* Abstract **** a double precision routine **** */
  56. /* DBESJ computes an N member sequence of J Bessel functions */
  57. /* J/sub(ALPHA+K-1)/(X), K=1,...,N for non-negative ALPHA and X. */
  58. /* A combination of the power series, the asymptotic expansion */
  59. /* for X to infinity and the uniform asymptotic expansion for */
  60. /* NU to infinity are applied over subdivisions of the (NU,X) */
  61. /* plane. For values of (NU,X) not covered by one of these */
  62. /* formulae, the order is incremented or decremented by integer */
  63. /* values into a region where one of the formulae apply. Backward */
  64. /* recursion is applied to reduce orders by integer values except */
  65. /* where the entire sequence lies in the oscillatory region. In */
  66. /* this case forward recursion is stable and values from the */
  67. /* asymptotic expansion for X to infinity start the recursion */
  68. /* when it is efficient to do so. Leading terms of the series and */
  69. /* uniform expansion are tested for underflow. If a sequence is */
  70. /* requested and the last member would underflow, the result is */
  71. /* set to zero and the next lower order tried, etc., until a */
  72. /* member comes on scale or all members are set to zero. */
  73. /* Overflow cannot occur. */
  74. /* The maximum number of significant digits obtainable */
  75. /* is the smaller of 14 and the number of digits carried in */
  76. /* double precision arithmetic. */
  77. /* Description of Arguments */
  78. /* Input X,ALPHA are double precision */
  79. /* X - X .GE. 0.0D0 */
  80. /* ALPHA - order of first member of the sequence, */
  81. /* ALPHA .GE. 0.0D0 */
  82. /* N - number of members in the sequence, N .GE. 1 */
  83. /* Output Y is double precision */
  84. /* Y - a vector whose first N components contain */
  85. /* values for J/sub(ALPHA+K-1)/(X), K=1,...,N */
  86. /* NZ - number of components of Y set to zero due to */
  87. /* underflow, */
  88. /* NZ=0 , normal return, computation completed */
  89. /* NZ .NE. 0, last NZ components of Y set to zero, */
  90. /* Y(K)=0.0D0, K=N-NZ+1,...,N. */
  91. /* Error Conditions */
  92. /* Improper input arguments - a fatal error */
  93. /* Underflow - a non-fatal error (NZ .NE. 0) */
  94. /* ***REFERENCES D. E. Amos, S. L. Daniel and M. K. Weston, CDC 6600 */
  95. /* subroutines IBESS and JBESS for Bessel functions */
  96. /* I(NU,X) and J(NU,X), X .GE. 0, NU .GE. 0, ACM */
  97. /* Transactions on Mathematical Software 3, (1977), */
  98. /* pp. 76-92. */
  99. /* F. W. J. Olver, Tables of Bessel Functions of Moderate */
  100. /* or Large Orders, NPL Mathematical Tables 6, Her */
  101. /* Majesty's Stationery Office, London, 1962. */
  102. /* ***ROUTINES CALLED D1MACH, DASYJY, DJAIRY, DLNGAM, I1MACH, XERMSG */
  103. /* ***REVISION HISTORY (YYMMDD) */
  104. /* 750101 DATE WRITTEN */
  105. /* 890531 Changed all specific intrinsics to generic. (WRB) */
  106. /* 890911 Removed unnecessary intrinsics. (WRB) */
  107. /* 890911 REVISION DATE from Version 3.2 */
  108. /* 891214 Prologue converted to Version 4.0 format. (BAB) */
  109. /* 900315 CALLs to XERROR changed to CALLs to XERMSG. (THJ) */
  110. /* 900326 Removed duplicate information from DESCRIPTION section. */
  111. /* (WRB) */
  112. /* 920501 Reformatted the REFERENCES section. (WRB) */
  113. /* ***END PROLOGUE DBESJ */
  114. /* Parameter adjustments */
  115. --y;
  116. /* Function Body */
  117. /* ***FIRST EXECUTABLE STATEMENT DBESJ */
  118. *nz = 0;
  119. kt = 1;
  120. ns = 0;
  121. /* I1MACH(14) REPLACES I1MACH(11) IN A DOUBLE PRECISION CODE */
  122. /* I1MACH(15) REPLACES I1MACH(12) IN A DOUBLE PRECISION CODE */
  123. ta = d1mach_(3);
  124. tol = max(ta,1e-15);
  125. i1 = i1mach_(14) + 1;
  126. i2 = i1mach_(15);
  127. tb = d1mach_(5);
  128. elim1 = (i2 * tb + 3.) * -2.303;
  129. rtol = 1. / tol;
  130. slim = d1mach_(1) * rtol * 1e3;
  131. /* TOLLN = -LN(TOL) */
  132. tolln = tb * 2.303 * i1;
  133. tolln = min(tolln,34.5388);
  134. if ((i__1 = *n - 1) < 0) {
  135. goto L720;
  136. } else if (i__1 == 0) {
  137. goto L10;
  138. } else {
  139. goto L20;
  140. }
  141. L10:
  142. kt = 2;
  143. L20:
  144. nn = *n;
  145. if (*x < 0.) {
  146. goto L730;
  147. } else if (*x == 0) {
  148. goto L30;
  149. } else {
  150. goto L80;
  151. }
  152. L30:
  153. if (*alpha < 0.) {
  154. goto L710;
  155. } else if (*alpha == 0) {
  156. goto L40;
  157. } else {
  158. goto L50;
  159. }
  160. L40:
  161. y[1] = 1.;
  162. if (*n == 1) {
  163. return 0;
  164. }
  165. i1 = 2;
  166. goto L60;
  167. L50:
  168. i1 = 1;
  169. L60:
  170. i__1 = *n;
  171. for (i__ = i1; i__ <= i__1; ++i__) {
  172. y[i__] = 0.;
  173. /* L70: */
  174. }
  175. return 0;
  176. L80:
  177. if (*alpha < 0.) {
  178. goto L710;
  179. }
  180. ialp = (integer) (*alpha);
  181. fni = (double) (ialp + *n - 1);
  182. fnf = *alpha - ialp;
  183. dfn = fni + fnf;
  184. fnu = dfn;
  185. xo2 = *x * .5;
  186. sxo2 = xo2 * xo2;
  187. /* DECISION TREE FOR REGION WHERE SERIES, ASYMPTOTIC EXPANSION FOR X */
  188. /* TO INFINITY AND ASYMPTOTIC EXPANSION FOR NU TO INFINITY ARE */
  189. /* APPLIED. */
  190. if (sxo2 <= fnu + 1.) {
  191. goto L90;
  192. }
  193. ta = max(20.,fnu);
  194. if (*x > ta) {
  195. goto L120;
  196. }
  197. if (*x > 12.) {
  198. goto L110;
  199. }
  200. xo2l = log(xo2);
  201. ns = (integer) (sxo2 - fnu) + 1;
  202. goto L100;
  203. L90:
  204. fn = fnu;
  205. fnp1 = fn + 1.;
  206. xo2l = log(xo2);
  207. is = kt;
  208. if (*x <= .5) {
  209. goto L330;
  210. }
  211. ns = 0;
  212. L100:
  213. fni += ns;
  214. dfn = fni + fnf;
  215. fn = dfn;
  216. fnp1 = fn + 1.;
  217. is = kt;
  218. if (*n - 1 + ns > 0) {
  219. is = 3;
  220. }
  221. goto L330;
  222. L110:
  223. /* Computing MAX */
  224. d__1 = 36. - fnu;
  225. ans = max(d__1,0.);
  226. ns = (integer) ans;
  227. fni += ns;
  228. dfn = fni + fnf;
  229. fn = dfn;
  230. is = kt;
  231. if (*n - 1 + ns > 0) {
  232. is = 3;
  233. }
  234. goto L130;
  235. L120:
  236. rtx = sqrt(*x);
  237. tau = rtwo * rtx;
  238. ta = tau + fnulim[kt - 1];
  239. if (fnu <= ta) {
  240. goto L480;
  241. }
  242. fn = fnu;
  243. is = kt;
  244. /* UNIFORM ASYMPTOTIC EXPANSION FOR NU TO INFINITY */
  245. L130:
  246. i1 = (i__1 = 3 - is, abs(i__1));
  247. i1 = max(i1,1);
  248. flgjy = 1.;
  249. dasyjy_(djairy_, x, &fn, &flgjy, &i1, &temp[is - 1], wk, &iflw);
  250. if (iflw != 0) {
  251. goto L380;
  252. }
  253. switch (is) {
  254. case 1: goto L320;
  255. case 2: goto L450;
  256. case 3: goto L620;
  257. }
  258. L310:
  259. temp[0] = temp[2];
  260. kt = 1;
  261. L320:
  262. is = 2;
  263. fni += -1.;
  264. dfn = fni + fnf;
  265. fn = dfn;
  266. if (i1 == 2) {
  267. goto L450;
  268. }
  269. goto L130;
  270. /* SERIES FOR (X/2)**2.LE.NU+1 */
  271. L330:
  272. gln = dlngam_(&fnp1);
  273. arg = fn * xo2l - gln;
  274. if (arg < -elim1) {
  275. goto L400;
  276. }
  277. earg = exp(arg);
  278. L340:
  279. s = 1.;
  280. if (*x < tol) {
  281. goto L360;
  282. }
  283. ak = 3.;
  284. t2 = 1.;
  285. t = 1.;
  286. s1 = fn;
  287. for (k = 1; k <= 17; ++k) {
  288. s2 = t2 + s1;
  289. t = -t * sxo2 / s2;
  290. s += t;
  291. if (abs(t) < tol) {
  292. goto L360;
  293. }
  294. t2 += ak;
  295. ak += 2.;
  296. s1 += fn;
  297. /* L350: */
  298. }
  299. L360:
  300. temp[is - 1] = s * earg;
  301. switch (is) {
  302. case 1: goto L370;
  303. case 2: goto L450;
  304. case 3: goto L610;
  305. }
  306. L370:
  307. earg = earg * fn / xo2;
  308. fni += -1.;
  309. dfn = fni + fnf;
  310. fn = dfn;
  311. is = 2;
  312. goto L340;
  313. /* SET UNDERFLOW VALUE AND UPDATE PARAMETERS */
  314. /* UNDERFLOW CAN ONLY OCCUR FOR NS=0 SINCE THE ORDER MUST BE LARGER */
  315. /* THAN 36. THEREFORE, NS NEE NOT BE TESTED. */
  316. L380:
  317. y[nn] = 0.;
  318. --nn;
  319. fni += -1.;
  320. dfn = fni + fnf;
  321. fn = dfn;
  322. if ((i__1 = nn - 1) < 0) {
  323. goto L440;
  324. } else if (i__1 == 0) {
  325. goto L390;
  326. } else {
  327. goto L130;
  328. }
  329. L390:
  330. kt = 2;
  331. is = 2;
  332. goto L130;
  333. L400:
  334. y[nn] = 0.;
  335. --nn;
  336. fnp1 = fn;
  337. fni += -1.;
  338. dfn = fni + fnf;
  339. fn = dfn;
  340. if ((i__1 = nn - 1) < 0) {
  341. goto L440;
  342. } else if (i__1 == 0) {
  343. goto L410;
  344. } else {
  345. goto L420;
  346. }
  347. L410:
  348. kt = 2;
  349. is = 2;
  350. L420:
  351. if (sxo2 <= fnp1) {
  352. goto L430;
  353. }
  354. goto L130;
  355. L430:
  356. arg = arg - xo2l + log(fnp1);
  357. if (arg < -elim1) {
  358. goto L400;
  359. }
  360. goto L330;
  361. L440:
  362. *nz = *n - nn;
  363. return 0;
  364. /* BACKWARD RECURSION SECTION */
  365. L450:
  366. if (ns != 0) {
  367. goto L451;
  368. }
  369. *nz = *n - nn;
  370. if (kt == 2) {
  371. goto L470;
  372. }
  373. /* BACKWARD RECUR FROM INDEX ALPHA+NN-1 TO ALPHA */
  374. y[nn] = temp[0];
  375. y[nn - 1] = temp[1];
  376. if (nn == 2) {
  377. return 0;
  378. }
  379. L451:
  380. trx = 2. / *x;
  381. dtm = fni;
  382. tm = (dtm + fnf) * trx;
  383. ak = 1.;
  384. ta = temp[0];
  385. tb = temp[1];
  386. if (abs(ta) > slim) {
  387. goto L455;
  388. }
  389. ta *= rtol;
  390. tb *= rtol;
  391. ak = tol;
  392. L455:
  393. kk = 2;
  394. in = ns - 1;
  395. if (in == 0) {
  396. goto L690;
  397. }
  398. if (ns != 0) {
  399. goto L670;
  400. }
  401. k = nn - 2;
  402. i__1 = nn;
  403. for (i__ = 3; i__ <= i__1; ++i__) {
  404. s = tb;
  405. tb = tm * tb - ta;
  406. ta = s;
  407. y[k] = tb * ak;
  408. dtm += -1.;
  409. tm = (dtm + fnf) * trx;
  410. --k;
  411. /* L460: */
  412. }
  413. return 0;
  414. L470:
  415. y[1] = temp[1];
  416. return 0;
  417. /* ASYMPTOTIC EXPANSION FOR X TO INFINITY WITH FORWARD RECURSION IN */
  418. /* OSCILLATORY REGION X.GT.MAX(20, NU), PROVIDED THE LAST MEMBER */
  419. /* OF THE SEQUENCE IS ALSO IN THE REGION. */
  420. L480:
  421. in = (integer) (*alpha - tau + 2.);
  422. if (in <= 0) {
  423. goto L490;
  424. }
  425. idalp = ialp - in - 1;
  426. kt = 1;
  427. goto L500;
  428. L490:
  429. idalp = ialp;
  430. in = 0;
  431. L500:
  432. is = kt;
  433. fidal = (double) idalp;
  434. dalpha = fidal + fnf;
  435. arg = *x - pidt * dalpha - pdf;
  436. sa = sin(arg);
  437. sb = cos(arg);
  438. coef = rttp / rtx;
  439. etx = *x * 8.;
  440. L510:
  441. dtm = fidal + fidal;
  442. dtm *= dtm;
  443. tm = 0.;
  444. if (fidal == 0. && abs(fnf) < tol) {
  445. goto L520;
  446. }
  447. tm = fnf * 4. * (fidal + fidal + fnf);
  448. L520:
  449. trx = dtm - 1.;
  450. t2 = (trx + tm) / etx;
  451. s2 = t2;
  452. relb = tol * abs(t2);
  453. t1 = etx;
  454. s1 = 1.;
  455. fn = 1.;
  456. ak = 8.;
  457. for (k = 1; k <= 13; ++k) {
  458. t1 += etx;
  459. fn += ak;
  460. trx = dtm - fn;
  461. ap = trx + tm;
  462. t2 = -t2 * ap / t1;
  463. s1 += t2;
  464. t1 += etx;
  465. ak += 8.;
  466. fn += ak;
  467. trx = dtm - fn;
  468. ap = trx + tm;
  469. t2 = t2 * ap / t1;
  470. s2 += t2;
  471. if (abs(t2) <= relb) {
  472. goto L540;
  473. }
  474. ak += 8.;
  475. /* L530: */
  476. }
  477. L540:
  478. temp[is - 1] = coef * (s1 * sb - s2 * sa);
  479. if (is == 2) {
  480. goto L560;
  481. }
  482. fidal += 1.;
  483. dalpha = fidal + fnf;
  484. is = 2;
  485. tb = sa;
  486. sa = -sb;
  487. sb = tb;
  488. goto L510;
  489. /* FORWARD RECURSION SECTION */
  490. L560:
  491. if (kt == 2) {
  492. goto L470;
  493. }
  494. s1 = temp[0];
  495. s2 = temp[1];
  496. tx = 2. / *x;
  497. tm = dalpha * tx;
  498. if (in == 0) {
  499. goto L580;
  500. }
  501. /* FORWARD RECUR TO INDEX ALPHA */
  502. i__1 = in;
  503. for (i__ = 1; i__ <= i__1; ++i__) {
  504. s = s2;
  505. s2 = tm * s2 - s1;
  506. tm += tx;
  507. s1 = s;
  508. /* L570: */
  509. }
  510. if (nn == 1) {
  511. goto L600;
  512. }
  513. s = s2;
  514. s2 = tm * s2 - s1;
  515. tm += tx;
  516. s1 = s;
  517. L580:
  518. /* FORWARD RECUR FROM INDEX ALPHA TO ALPHA+N-1 */
  519. y[1] = s1;
  520. y[2] = s2;
  521. if (nn == 2) {
  522. return 0;
  523. }
  524. i__1 = nn;
  525. for (i__ = 3; i__ <= i__1; ++i__) {
  526. y[i__] = tm * y[i__ - 1] - y[i__ - 2];
  527. tm += tx;
  528. /* L590: */
  529. }
  530. return 0;
  531. L600:
  532. y[1] = s2;
  533. return 0;
  534. /* BACKWARD RECURSION WITH NORMALIZATION BY */
  535. /* ASYMPTOTIC EXPANSION FOR NU TO INFINITY OR POWER SERIES. */
  536. L610:
  537. /* COMPUTATION OF LAST ORDER FOR SERIES NORMALIZATION */
  538. /* Computing MAX */
  539. d__1 = 3. - fn;
  540. akm = max(d__1,0.);
  541. km = (integer) akm;
  542. tfn = fn + km;
  543. ta = (gln + tfn - .9189385332 - .0833333333 / tfn) / (tfn + .5);
  544. ta = xo2l - ta;
  545. tb = -(1. - 1.5 / tfn) / tfn;
  546. akm = tolln / (-ta + sqrt(ta * ta - tolln * tb)) + 1.5;
  547. in = km + (integer) akm;
  548. goto L660;
  549. L620:
  550. /* COMPUTATION OF LAST ORDER FOR ASYMPTOTIC EXPANSION NORMALIZATION */
  551. gln = wk[2] + wk[1];
  552. if (wk[5] > 30.) {
  553. goto L640;
  554. }
  555. rden = (pp[3] * wk[5] + pp[2]) * wk[5] + 1.;
  556. rzden = pp[0] + pp[1] * wk[5];
  557. ta = rzden / rden;
  558. if (wk[0] < .1) {
  559. goto L630;
  560. }
  561. tb = gln / wk[4];
  562. goto L650;
  563. L630:
  564. tb = ((wk[0] * .0887944358 + .167989473) * wk[0] + 1.259921049) / wk[6];
  565. goto L650;
  566. L640:
  567. ta = tolln * .5 / wk[3];
  568. ta = ((ta * .049382716 - .1111111111) * ta + .6666666667) * ta * wk[5];
  569. if (wk[0] < .1) {
  570. goto L630;
  571. }
  572. tb = gln / wk[4];
  573. L650:
  574. in = (integer) (ta / tb + 1.5);
  575. if (in > inlim) {
  576. goto L310;
  577. }
  578. L660:
  579. dtm = fni + in;
  580. trx = 2. / *x;
  581. tm = (dtm + fnf) * trx;
  582. ta = 0.;
  583. tb = tol;
  584. kk = 1;
  585. ak = 1.;
  586. L670:
  587. /* BACKWARD RECUR UNINDEXED */
  588. i__1 = in;
  589. for (i__ = 1; i__ <= i__1; ++i__) {
  590. s = tb;
  591. tb = tm * tb - ta;
  592. ta = s;
  593. dtm += -1.;
  594. tm = (dtm + fnf) * trx;
  595. /* L680: */
  596. }
  597. /* NORMALIZATION */
  598. if (kk != 1) {
  599. goto L690;
  600. }
  601. s = temp[2];
  602. sa = ta / tb;
  603. ta = s;
  604. tb = s;
  605. if (abs(s) > slim) {
  606. goto L685;
  607. }
  608. ta *= rtol;
  609. tb *= rtol;
  610. ak = tol;
  611. L685:
  612. ta *= sa;
  613. kk = 2;
  614. in = ns;
  615. if (ns != 0) {
  616. goto L670;
  617. }
  618. L690:
  619. y[nn] = tb * ak;
  620. *nz = *n - nn;
  621. if (nn == 1) {
  622. return 0;
  623. }
  624. k = nn - 1;
  625. s = tb;
  626. tb = tm * tb - ta;
  627. ta = s;
  628. y[k] = tb * ak;
  629. if (nn == 2) {
  630. return 0;
  631. }
  632. dtm += -1.;
  633. tm = (dtm + fnf) * trx;
  634. k = nn - 2;
  635. /* BACKWARD RECUR INDEXED */
  636. i__1 = nn;
  637. for (i__ = 3; i__ <= i__1; ++i__) {
  638. s = tb;
  639. tb = tm * tb - ta;
  640. ta = s;
  641. y[k] = tb * ak;
  642. dtm += -1.;
  643. tm = (dtm + fnf) * trx;
  644. --k;
  645. /* L700: */
  646. }
  647. return 0;
  648. L710:
  649. xermsg_("SLATEC", "DBESJ", "ORDER, ALPHA, LESS THAN ZERO.", &c__2, &c__1,
  650. (ftnlen)6, (ftnlen)5, (ftnlen)29);
  651. return 0;
  652. L720:
  653. xermsg_("SLATEC", "DBESJ", "N LESS THAN ONE.", &c__2, &c__1, (ftnlen)6, (
  654. ftnlen)5, (ftnlen)16);
  655. return 0;
  656. L730:
  657. xermsg_("SLATEC", "DBESJ", "X LESS THAN ZERO.", &c__2, &c__1, (ftnlen)6, (
  658. ftnlen)5, (ftnlen)17);
  659. return 0;
  660. } /* dbesj_ */