nag.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  1. /* file nag.c */
  2. /* Signature: 0506e9a8 27-Jan-1997 */
  3. #include <stdarg.h>
  4. #include <sys/types.h>
  5. #include <string.h>
  6. #include "machine.h"
  7. #include "tags.h"
  8. #include "cslerror.h"
  9. #include "externs.h"
  10. #include "entries.h"
  11. #include "arith.h"
  12. #ifdef TESTNAG
  13. #ifdef LOADLIB /* load DLLs when necessary */
  14. #undef IGNORE /* avoid conflicting macro definitions */
  15. #include <windows.h> /* is this OK here? */
  16. #else /* load DLLs when program is first run */
  17. /* Temporary fix to take account of different naming conventions */
  18. #if defined(__alpha)
  19. #define D01AJF d01ajf_
  20. #define SXXEAF sxxeaf_
  21. #elif 1 /* DLL from FPSNT / Win32 version */ /* FIXME */
  22. /* leave D01AJF etc as it is (DLL exports _D01AJF@48) */
  23. #else
  24. #define D01AJF d01ajf
  25. #define SXXEAF sxxeaf
  26. #endif
  27. #endif /* LOADLIB */
  28. #ifdef LOADLIB
  29. HINSTANCE prevlib = NULL, currlib = NULL;
  30. void free_prevlib ();
  31. #endif
  32. typedef struct
  33. {
  34. char *str;
  35. int32 len; /* or unsigned? */
  36. } fstring1;
  37. /*
  38. This checks a 32 bit integer's value and returns it as either a fixnum
  39. or a bignum.
  40. */
  41. #define int2ccl(i)\
  42. (i > -268435455 && i < 268435456) ? fixnum_of_int(i) : make_one_word_bignum(i)
  43. extern void mkFortranVectorDouble(double *loc, Lisp_Object v, int32 dim);
  44. #include "nag_d.c" /* D chapter routines */
  45. #include "nag_s.c" /* S chapter routines */
  46. /*
  47. * Turn a vector of ints into a Lisp vector of vectors, corresponding to
  48. * the AXIOM representation of a Matrix(Integer).
  49. */
  50. Lisp_Object mkIntVector(int32 v[], int32 nrows, int32 ncols)
  51. {
  52. Lisp_Object nil=C_nil;
  53. Lisp_Object new, new_row;
  54. int32 i,j;
  55. new = getvector(TAG_VECTOR, TYPE_SIMPLE_VEC, 4*nrows+4);
  56. errexit();
  57. /* vectors must pad to an even number of words */
  58. if ((nrows & 1) == 0) elt(new,nrows) = nil;
  59. for (i=0;i<nrows;++i) {
  60. new_row = getvector(TAG_VECTOR, TYPE_SIMPLE_VEC, 4*ncols+4);
  61. errexit();
  62. /* vectors must pad to an even number of words */
  63. if ((ncols & 1) == 0) elt(new_row,ncols) = nil;
  64. for (j=0;j<ncols;++j) elt(new_row,j) = int2ccl(v[i*ncols+j]);
  65. elt(new,i) = new_row;
  66. }
  67. return onevalue(new);
  68. }
  69. /*
  70. * Turn a vector of doubles into a Lisp vector of vectors, corresponding to
  71. * the AXIOM representation of a Matrix(DoubleFloat).
  72. */
  73. Lisp_Object mkFloatVector(double v[], int32 nrows, int32 ncols)
  74. {
  75. Lisp_Object nil=C_nil;
  76. Lisp_Object new, new_row, Lflt;
  77. int32 i, j;
  78. new = getvector(TAG_VECTOR, TYPE_SIMPLE_VEC, 4*nrows+4);
  79. errexit();
  80. /* vectors must pad to an even number of words */
  81. if ((nrows & 1) == 0) elt(new,nrows) = nil;
  82. for (i=0;i<nrows;++i) {
  83. push(new);
  84. new_row = getvector(TAG_VECTOR, TYPE_SIMPLE_VEC, 4*ncols+4);
  85. pop(new);
  86. errexit();
  87. /* vectors must pad to an even number of words */
  88. if ((ncols & 1) == 0) elt(new_row,ncols) = nil;
  89. for (j=0;j<ncols;++j) {
  90. push2(new, new_row);
  91. Lflt = make_boxfloat(v[i*ncols+j],TYPE_DOUBLE_FLOAT);
  92. pop2(new_row, new);
  93. errexit();
  94. elt(new_row,j) = Lflt;
  95. }
  96. elt(new,i) = new_row;
  97. }
  98. return onevalue(new);
  99. }
  100. typedef struct complex{
  101. double re;
  102. double im;
  103. } complex;
  104. /*
  105. * Turn a vector of complexes into a Lisp vector of vectors, corresponding to
  106. * the AXIOM representation of a Matrix(Complex DoubleFloat).
  107. */
  108. Lisp_Object mkComplexVector(complex v[], int32 nrows, int32 ncols)
  109. {
  110. Lisp_Object nil=C_nil;
  111. Lisp_Object new, new_row, Lflt1, Lflt2;
  112. complex z;
  113. int32 i, j;
  114. new = getvector(TAG_VECTOR, TYPE_SIMPLE_VEC, 4*nrows+4);
  115. errexit();
  116. /* vectors must pad to an even number of words */
  117. if ((nrows & 1) == 0) elt(new,nrows) = nil;
  118. for (i=0;i<nrows;++i) {
  119. push(new);
  120. new_row = getvector(TAG_VECTOR, TYPE_SIMPLE_VEC, 4*ncols+4);
  121. pop(new);
  122. errexit();
  123. /* vectors must pad to an even number of words */
  124. if ((ncols & 1) == 0) elt(new,ncols) = nil;
  125. for (j=0;j<ncols;++j) {
  126. push2(new, new_row);
  127. z = v[i*ncols+j];
  128. Lflt1 = make_boxfloat(z.re,TYPE_DOUBLE_FLOAT);
  129. Lflt2 = make_boxfloat(z.im,TYPE_DOUBLE_FLOAT);
  130. pop2(new_row, new);
  131. errexit();
  132. elt(new_row,j) = Lcons(nil,Lflt1,Lflt2);
  133. }
  134. elt(new,i) = new_row;
  135. }
  136. return onevalue(new);
  137. }
  138. #if 0
  139. Lisp_Object MS_CDECL Ls01eaf(Lisp_Object nil, int nargs, ...)
  140. {
  141. va_list args;
  142. Lisp_Object Lzr, Lzi, Lifail;
  143. double z[2], result[2];
  144. int32 ifail;
  145. /*
  146. * Returning DOUBLE COMPLEX objects via the function name is not portable
  147. * so we use a dummy subroutine as glue.
  148. */
  149. #ifdef LOADLIB
  150. typedef void (__stdcall *PSXXEAF) (double *, double *, int*);
  151. HINSTANCE hLib;
  152. PSXXEAF sxxeaf_proc;
  153. #else
  154. #if 0
  155. extern void SXXEAF();
  156. #else
  157. extern void __stdcall SXXEAF (double *, double *, int32 *);
  158. #endif
  159. #endif
  160. /* Set up arguments as Lisp Objects */
  161. argcheck(nargs,3,"Ls01eaf");
  162. va_start(args,nargs);
  163. Lzr = va_arg(args, Lisp_Object);
  164. Lzi = va_arg(args, Lisp_Object);
  165. Lifail = va_arg(args, Lisp_Object);
  166. va_end(args);
  167. /* Translate arguments into C objects */
  168. push3(Lzr,Lzi,Lifail);
  169. z[0] = float_of_number(Lzr);
  170. pop3(Lifail,Lzi,Lzr);
  171. errexit();
  172. push3(Lzr,Lzi,Lifail);
  173. z[1] = float_of_number(Lzi);
  174. pop3(Lifail,Lzi,Lzr);
  175. errexit();
  176. push3(Lzr,Lzi,Lifail);
  177. ifail = thirty_two_bits(Lifail);
  178. pop3(Lifail,Lzi,Lzr);
  179. errexit();
  180. /* Call NAG routine */
  181. #ifdef LOADLIB
  182. if ( (hLib = LoadLibrary ("sxxeafdl")) == NULL )
  183. {
  184. /* couldn't find DLL -- error handling here */
  185. result[0] = 999.999; /* FIXME */
  186. result[1] = 999.999;
  187. ifail = -999;
  188. }
  189. else /* OK so far */
  190. {
  191. if ( (sxxeaf_proc = (PSXXEAF) GetProcAddress (hLib, "_SXXEAF@12"))
  192. == NULL )
  193. {
  194. /* couldn't find function within DLL -- error handling here */
  195. result[0] = 999.999; /* FIXME */
  196. result[1] = 999.999;
  197. ifail = -998;
  198. }
  199. else /* have found function in DLL */
  200. {
  201. (*sxxeaf_proc) (z, result, &ifail);
  202. }
  203. if ( FreeLibrary (hLib) == FALSE )
  204. {
  205. /* couldn't free library -- possible error handling here */
  206. ifail += 1000;
  207. }
  208. }
  209. #else
  210. SXXEAF(z,result,&ifail);
  211. #endif
  212. /* Translate return values to CCL */
  213. /* Copy result */
  214. Lzr = make_boxfloat(result[0],TYPE_DOUBLE_FLOAT);
  215. push(Lzr);
  216. Lzi = make_boxfloat(result[1],TYPE_DOUBLE_FLOAT);
  217. pop(Lzr);
  218. errexit();
  219. push2(Lzr,Lzi);
  220. Lifail = int2ccl(ifail);
  221. pop2(Lzi,Lzr);
  222. errexit();
  223. return Llist(nil,3,Lzr,Lzi,Lifail);
  224. }
  225. Lisp_Object Ls13aaf(Lisp_Object nil, Lisp_Object Lx, Lisp_Object Lifail)
  226. {
  227. Lisp_Object Ly;
  228. double x, y;
  229. int32 ifail;
  230. #ifdef LOADLIB
  231. typedef double (__stdcall *PS13AAF) (double *, int*);
  232. HINSTANCE hLib;
  233. PS13AAF s13aaf_proc;
  234. #else
  235. extern double __stdcall S13AAF (double *, int32 *);
  236. #endif
  237. /* Translate arguments into C objects */
  238. push2(Lx,Lifail);
  239. x = float_of_number(Lx);
  240. pop2(Lifail,Lx);
  241. errexit();
  242. push2(Lx,Lifail);
  243. ifail = thirty_two_bits(Lifail);
  244. pop2(Lifail,Lx);
  245. errexit();
  246. /* Call NAG routine */
  247. #ifdef LOADLIB
  248. if ( (hLib = LoadLibrary ("nagfas")) == NULL )
  249. {
  250. /* couldn't find DLL -- error handling here */
  251. y = 999.999; /* FIXME */
  252. ifail = -999;
  253. }
  254. else /* OK so far */
  255. {
  256. if ( (s13aaf_proc = (PS13AAF) GetProcAddress (hLib, "_S13AAF@8"))
  257. == NULL )
  258. {
  259. /* couldn't find function within DLL -- error handling here */
  260. y = 999.999; /* FIXME */
  261. ifail = -998;
  262. }
  263. else /* have found function in DLL */
  264. {
  265. y = (*s13aaf_proc) (&x, &ifail);
  266. }
  267. if ( FreeLibrary (hLib) == FALSE )
  268. {
  269. /* couldn't free library -- possible error handling here */
  270. ifail += 1000;
  271. }
  272. }
  273. #else
  274. y = S13AAF(&x,&ifail);
  275. #endif
  276. /* Translate return values to CCL */
  277. /* Copy result */
  278. Ly = make_boxfloat(y,TYPE_DOUBLE_FLOAT);
  279. push(Ly);
  280. Lifail = int2ccl(ifail);
  281. pop(Ly);
  282. errexit();
  283. return Llist(nil,2,Ly,Lifail);
  284. }
  285. #endif /* s01eaf & s13aaf */
  286. #if 0
  287. Lisp_Object MS_CDECL Ld01ajf(Lisp_Object nil, int nargs, ...)
  288. {
  289. va_list args;
  290. Lisp_Object La, Lb, Lepsabs, Lepsrel, Llw, Lliw, Lifail, Lresult, Labserr,
  291. Lw, Liw;
  292. double a, b, epsabs, epsrel, result, abserr, *w;
  293. int32 ifail, lw, *iw, liw;
  294. #if 0
  295. extern double asp1();
  296. #else
  297. extern double __stdcall asp1(double *);
  298. #endif
  299. #ifdef LOADLIB
  300. typedef void (__stdcall *PD01AJF) (double __stdcall (*fst) (double *),
  301. double *, double *, double *, double *, double *, double *,
  302. double *, int *, int *, int *, int *);
  303. HINSTANCE hLib;
  304. PD01AJF d01ajf_proc;
  305. #else
  306. #if 0
  307. extern void D01AJF();
  308. #else
  309. extern void __stdcall D01AJF(double __stdcall (*fst) (double *), double *, double *, double *,
  310. double *, double *, double *, double *, int *, int *, int *,
  311. int *);
  312. #endif
  313. #endif
  314. /* Set up arguments as Lisp Objects */
  315. argcheck(nargs,7,"Ld01ajf");
  316. va_start(args,nargs);
  317. La = va_arg(args, Lisp_Object);
  318. Lb = va_arg(args, Lisp_Object);
  319. Lepsabs = va_arg(args, Lisp_Object);
  320. Lepsrel = va_arg(args, Lisp_Object);
  321. Llw = va_arg(args, Lisp_Object);
  322. Lliw = va_arg(args, Lisp_Object);
  323. Lifail = va_arg(args, Lisp_Object);
  324. va_end(args);
  325. /* Translate arguments into C objects */
  326. push4(La,Lb,Lepsabs,Lepsrel);
  327. push3(Llw,Lliw,Lifail);
  328. a = float_of_number(La);
  329. pop4(Lifail,Lliw,Llw,Lepsrel);
  330. pop3(Lepsabs,Lb,La);
  331. errexit();
  332. push4(La,Lb,Lepsabs,Lepsrel);
  333. push3(Llw,Lliw,Lifail);
  334. b = float_of_number(Lb);
  335. pop4(Lifail,Lliw,Llw,Lepsrel);
  336. pop3(Lepsabs,Lb,La);
  337. errexit();
  338. push4(La,Lb,Lepsabs,Lepsrel);
  339. push3(Llw,Lliw,Lifail);
  340. epsabs = float_of_number(Lepsabs);
  341. pop4(Lifail,Lliw,Llw,Lepsrel);
  342. pop3(Lepsabs,Lb,La);
  343. errexit();
  344. push4(La,Lb,Lepsabs,Lepsrel);
  345. push3(Llw,Lliw,Lifail);
  346. epsrel = float_of_number(Lepsrel);
  347. pop4(Lifail,Lliw,Llw,Lepsrel);
  348. pop3(Lepsabs,Lb,La);
  349. errexit();
  350. push4(La,Lb,Lepsabs,Lepsrel);
  351. push3(Llw,Lliw,Lifail);
  352. lw = thirty_two_bits(Llw);
  353. pop4(Lifail,Lliw,Llw,Lepsrel);
  354. pop3(Lepsabs,Lb,La);
  355. errexit();
  356. push4(La,Lb,Lepsabs,Lepsrel);
  357. push3(Llw,Lliw,Lifail);
  358. liw = thirty_two_bits(Lliw);
  359. pop4(Lifail,Lliw,Llw,Lepsrel);
  360. pop3(Lepsabs,Lb,La);
  361. errexit();
  362. push4(La,Lb,Lepsabs,Lepsrel);
  363. push3(Llw,Lliw,Lifail);
  364. ifail = thirty_two_bits(Lifail);
  365. pop4(Lifail,Lliw,Llw,Lepsrel);
  366. pop3(Lepsabs,Lb,La);
  367. errexit();
  368. /* Setup workspace arrays etc. */
  369. w = (double *)malloc(lw*sizeof(double));
  370. iw = (int *)malloc(liw*sizeof(int));
  371. /* Call NAG routine */
  372. #ifdef LOADLIB
  373. if ( (hLib = LoadLibrary ("d01ajfdl")) == NULL )
  374. {
  375. /* couldn't find DLL -- error handling here */
  376. result = 999.999; /* FIXME */
  377. ifail = -999;
  378. }
  379. else
  380. {
  381. if ( (d01ajf_proc = (PD01AJF) GetProcAddress (hLib, "_D01AJF@48")) == NULL )
  382. {
  383. /* couldn't find function within DLL -- error handling here */
  384. result = 999.999; /* FIXME */
  385. ifail = -998;
  386. }
  387. else
  388. {
  389. (*d01ajf_proc) (&asp1, &a, &b, &epsabs, &epsrel, &result, &abserr, w, &lw,
  390. iw, &liw, &ifail);
  391. }
  392. if ( FreeLibrary (hLib) == FALSE )
  393. {
  394. /* couldn't free library -- possible error handling here */
  395. ifail += 1000;
  396. }
  397. }
  398. #else
  399. D01AJF(&asp1,&a,&b,&epsabs,&epsrel,&result,&abserr,w, &lw, iw, &liw, &ifail);
  400. #endif
  401. /* Translate return values to CCL */
  402. Lresult = make_boxfloat(result,TYPE_DOUBLE_FLOAT);
  403. push(Lresult);
  404. Labserr = make_boxfloat(abserr,TYPE_DOUBLE_FLOAT);
  405. pop(Lresult);
  406. errexit();
  407. push2(Lresult,Labserr);
  408. Lw = mkFloatVector(w,lw,1);
  409. pop2(Labserr,Lresult);
  410. errexit();
  411. push3(Lresult,Labserr,Lw);
  412. Liw = mkIntVector(iw,liw,1);
  413. pop3(Lw,Labserr,Lresult);
  414. errexit();
  415. push4(Lresult,Labserr,Lw,Liw);
  416. Lifail = fixnum_of_int(ifail);
  417. pop4(Liw,Lw,Labserr,Lresult);
  418. /*
  419. Lw = mkFloatVector(w,lw,1);
  420. pop2(Labserr,Lresult);
  421. errexit();
  422. push3(Lresult,Labserr,Lw);
  423. Lifail = fixnum_of_int(ifail);
  424. pop3(Lw,Labserr,Lresult);
  425. */
  426. errexit();
  427. return Llist(nil,5,Lresult,Labserr,Lw,Liw,Lifail);
  428. // return Llist(nil,4,Lresult,Labserr,Liw,Lifail);
  429. }
  430. #endif /* Ld01ajf */
  431. Lisp_Object MS_CDECL Lbug(Lisp_Object nil, int nargs, ...)
  432. {
  433. double *f;
  434. int i;
  435. f = (double *)malloc(100*sizeof(double));
  436. for ( i = 0; i < 100; i++ )
  437. *(f + i) = (double) i;
  438. return mkFloatVector(f,100,1);
  439. }
  440. #ifdef LOADLIB
  441. void free_prevlib ()
  442. {
  443. if ( prevlib != NULL )
  444. if ( FreeLibrary (prevlib) )
  445. {
  446. /* couldn't free library -- possible error handling here */
  447. }
  448. prevlib = currlib;
  449. }
  450. #endif
  451. #else
  452. Lisp_Object nag_error1(Lisp_Object nil, Lisp_Object arg)
  453. {
  454. return aerror0("This version of the NAG Link is not available on this platform");
  455. }
  456. Lisp_Object nag_error2(Lisp_Object nil, Lisp_Object arg1, Lisp_Object arg2)
  457. {
  458. return aerror0("This version of the NAG Link is not available on this platform");
  459. }
  460. Lisp_Object MS_CDECL nag_error0(Lisp_Object nil, int nargs, ...)
  461. {
  462. return aerror0("This version of the NAG Link is not available on this platform");
  463. }
  464. #endif
  465. setup_type const nag_setup[] =
  466. {
  467. #ifdef TESTNAG
  468. {"d01ajf", wrong_no_na, wrong_no_nb, Ld01ajf},
  469. {"d01akf", wrong_no_na, wrong_no_nb, Ld01akf},
  470. {"d01alf", wrong_no_na, wrong_no_nb, Ld01alf},
  471. {"d01amf", wrong_no_na, wrong_no_nb, Ld01amf},
  472. {"d01anf", wrong_no_na, wrong_no_nb, Ld01anf},
  473. {"d01apf", wrong_no_na, wrong_no_nb, Ld01apf},
  474. {"d01aqf", wrong_no_na, wrong_no_nb, Ld01aqf},
  475. {"d01asf", wrong_no_na, wrong_no_nb, Ld01asf},
  476. {"d01bbf", wrong_no_na, wrong_no_nb, Ld01bbf},
  477. {"d01fcf", wrong_no_na, wrong_no_nb, Ld01fcf},
  478. {"d01gaf", wrong_no_na, wrong_no_nb, Ld01gaf},
  479. {"d01gbf", wrong_no_na, wrong_no_nb, Ld01gbf},
  480. {"d02bbf", wrong_no_na, wrong_no_nb, Ld02bbf},
  481. {"d02bhf", wrong_no_na, wrong_no_nb, Ld02bhf},
  482. {"d02cjf", wrong_no_na, wrong_no_nb, Ld02cjf},
  483. {"d02ejf", wrong_no_na, wrong_no_nb, Ld02ejf},
  484. {"d02gaf", wrong_no_na, wrong_no_nb, Ld02gaf},
  485. {"d02gbf", wrong_no_na, wrong_no_nb, Ld02gbf},
  486. {"d02kef", wrong_no_na, wrong_no_nb, Ld02kef},
  487. {"d02raf", wrong_no_na, wrong_no_nb, Ld02raf},
  488. {"d03edf", wrong_no_na, wrong_no_nb, Ld03edf},
  489. {"d03eef", wrong_no_na, wrong_no_nb, Ld03eef},
  490. {"d03faf", wrong_no_na, wrong_no_nb, Ld03faf},
  491. {"s01eaf", wrong_no_na, wrong_no_nb, Ls01eaf},
  492. {"s13aaf", too_few_2, Ls13aaf, wrong_no_2},
  493. {"s13acf", too_few_2, Ls13acf, wrong_no_2},
  494. {"s13adf", too_few_2, Ls13adf, wrong_no_2},
  495. {"s14aaf", too_few_2, Ls14aaf, wrong_no_2},
  496. {"s14abf", too_few_2, Ls14abf, wrong_no_2},
  497. {"s14baf", wrong_no_na, wrong_no_nb, Ls14baf},
  498. {"s15adf", too_few_2, Ls15adf, wrong_no_2},
  499. {"s15aef", too_few_2, Ls15aef, wrong_no_2},
  500. {"s17acf", too_few_2, Ls17acf, wrong_no_2},
  501. {"s17adf", too_few_2, Ls17adf, wrong_no_2},
  502. {"s17aef", too_few_2, Ls17aef, wrong_no_2},
  503. {"s17aff", too_few_2, Ls17aff, wrong_no_2},
  504. {"s17agf", too_few_2, Ls17agf, wrong_no_2},
  505. {"s17ahf", too_few_2, Ls17ahf, wrong_no_2},
  506. {"s17ajf", too_few_2, Ls17ajf, wrong_no_2},
  507. {"s17akf", too_few_2, Ls17akf, wrong_no_2},
  508. {"s17dcf", wrong_no_na, wrong_no_nb, Ls17dcf},
  509. {"s17def", wrong_no_na, wrong_no_nb, Ls17def},
  510. {"s17dgf", wrong_no_na, wrong_no_nb, Ls17dgf},
  511. {"s17dhf", wrong_no_na, wrong_no_nb, Ls17dhf},
  512. {"s17dlf", wrong_no_na, wrong_no_nb, Ls17dlf},
  513. {"s18acf", too_few_2, Ls18acf, wrong_no_2},
  514. {"s18adf", too_few_2, Ls18adf, wrong_no_2},
  515. {"s18aef", too_few_2, Ls18aef, wrong_no_2},
  516. {"s18aff", too_few_2, Ls18aff, wrong_no_2},
  517. {"s18dcf", wrong_no_na, wrong_no_nb, Ls18dcf},
  518. {"s18def", wrong_no_na, wrong_no_nb, Ls18def},
  519. {"s19aaf", too_few_2, Ls19aaf, wrong_no_2},
  520. {"s19abf", too_few_2, Ls19abf, wrong_no_2},
  521. {"s19acf", too_few_2, Ls19acf, wrong_no_2},
  522. {"s19adf", too_few_2, Ls19adf, wrong_no_2},
  523. {"s20acf", too_few_2, Ls20acf, wrong_no_2},
  524. {"s20adf", too_few_2, Ls20adf, wrong_no_2},
  525. {"s21baf", wrong_no_na, wrong_no_nb, Ls21baf},
  526. {"s21bbf", wrong_no_na, wrong_no_nb, Ls21bbf},
  527. {"s21bcf", wrong_no_na, wrong_no_nb, Ls21bcf},
  528. {"s21bdf", wrong_no_na, wrong_no_nb, Ls21bdf},
  529. #else
  530. {"d01ajf", nag_error1, nag_error2, nag_error0},
  531. {"d01akf", nag_error1, nag_error2, nag_error0},
  532. {"d01alf", nag_error1, nag_error2, nag_error0},
  533. {"d01amf", nag_error1, nag_error2, nag_error0},
  534. {"d01anf", nag_error1, nag_error2, nag_error0},
  535. {"d01apf", nag_error1, nag_error2, nag_error0},
  536. {"d01aqf", nag_error1, nag_error2, nag_error0},
  537. {"d01asf", nag_error1, nag_error2, nag_error0},
  538. {"d01bbf", nag_error1, nag_error2, nag_error0},
  539. {"d01fcf", nag_error1, nag_error2, nag_error0},
  540. {"d01gaf", nag_error1, nag_error2, nag_error0},
  541. {"d01gbf", nag_error1, nag_error2, nag_error0},
  542. {"d02bbf", nag_error1, nag_error2, nag_error0},
  543. {"d02bhf", nag_error1, nag_error2, nag_error0},
  544. {"d02cjf", nag_error1, nag_error2, nag_error0},
  545. {"d02ejf", nag_error1, nag_error2, nag_error0},
  546. {"d02gaf", nag_error1, nag_error2, nag_error0},
  547. {"d02gbf", nag_error1, nag_error2, nag_error0},
  548. {"d02kef", nag_error1, nag_error2, nag_error0},
  549. {"d02raf", nag_error1, nag_error2, nag_error0},
  550. {"d03edf", nag_error1, nag_error2, nag_error0},
  551. {"d03eef", nag_error1, nag_error2, nag_error0},
  552. {"d03faf", nag_error1, nag_error2, nag_error0},
  553. {"s01eaf", nag_error1, nag_error2, nag_error0},
  554. {"s13aaf", nag_error1, nag_error2, nag_error0},
  555. {"s13acf", nag_error1, nag_error2, nag_error0},
  556. {"s13adf", nag_error1, nag_error2, nag_error0},
  557. {"s14aaf", nag_error1, nag_error2, nag_error0},
  558. {"s14abf", nag_error1, nag_error2, nag_error0},
  559. {"s14baf", nag_error1, nag_error2, nag_error0},
  560. {"s15adf", nag_error1, nag_error2, nag_error0},
  561. {"s15aef", nag_error1, nag_error2, nag_error0},
  562. {"s17acf", nag_error1, nag_error2, nag_error0},
  563. {"s17adf", nag_error1, nag_error2, nag_error0},
  564. {"s17aef", nag_error1, nag_error2, nag_error0},
  565. {"s17aff", nag_error1, nag_error2, nag_error0},
  566. {"s17agf", nag_error1, nag_error2, nag_error0},
  567. {"s17ahf", nag_error1, nag_error2, nag_error0},
  568. {"s17ajf", nag_error1, nag_error2, nag_error0},
  569. {"s17akf", nag_error1, nag_error2, nag_error0},
  570. {"s17dcf", nag_error1, nag_error2, nag_error0},
  571. {"s17def", nag_error1, nag_error2, nag_error0},
  572. {"s17dgf", nag_error1, nag_error2, nag_error0},
  573. {"s17dhf", nag_error1, nag_error2, nag_error0},
  574. {"s17dlf", nag_error1, nag_error2, nag_error0},
  575. {"s18acf", nag_error1, nag_error2, nag_error0},
  576. {"s18adf", nag_error1, nag_error2, nag_error0},
  577. {"s18aef", nag_error1, nag_error2, nag_error0},
  578. {"s18aff", nag_error1, nag_error2, nag_error0},
  579. {"s18dcf", nag_error1, nag_error2, nag_error0},
  580. {"s18def", nag_error1, nag_error2, nag_error0},
  581. {"s19aaf", nag_error1, nag_error2, nag_error0},
  582. {"s19abf", nag_error1, nag_error2, nag_error0},
  583. {"s19acf", nag_error1, nag_error2, nag_error0},
  584. {"s19adf", nag_error1, nag_error2, nag_error0},
  585. {"s20acf", nag_error1, nag_error2, nag_error0},
  586. {"s20adf", nag_error1, nag_error2, nag_error0},
  587. {"s21baf", nag_error1, nag_error2, nag_error0},
  588. {"s21bbf", nag_error1, nag_error2, nag_error0},
  589. {"s21bcf", nag_error1, nag_error2, nag_error0},
  590. {"s21bdf", nag_error1, nag_error2, nag_error0},
  591. #endif
  592. {NULL, 0, 0, 0}
  593. };
  594. /* end of nag.c */