cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TestQuadpack.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2022 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 #include "cdstd.h"
4 #include <UnitTest++.h>
5 #include "cddefines.h"
6 #include "thirdparty_quadpack.h"
7 #include "physconst.h"
8 
9 namespace {
10 
11  sys_float qngf(sys_float x)
12  {
13  sys_float ret_val;
14 
15  ret_val = exp(x) / (x * x + 1.f);
16  return ret_val;
17  }
18 
19  TEST(TestQng)
20  {
21  sys_float a, b;
22  long ier;
23  long neval;
24  sys_float epsabs, abserr, epsrel, result;
25 
26  a = 0.f;
27  b = 1.f;
28  epsabs = 0.f;
29  epsrel = .001f;
30  qng_(E_fp_fp(qngf),
31  &a, &b, &epsabs, &epsrel, &result, &abserr, &neval, &
32  ier);
33  if (0) printf("QNG: Result=%.8g abserr=%.8g neval=%ld ier=%ld\n",
34  result,abserr,neval,ier);
35  CHECK( fp_equal_tol( result, 1.2707243f, 1e-5f ) );
36  CHECK( fp_equal_tol( abserr, 7.574107e-6f, 1e-9f ) );
37  CHECK_EQUAL( 21, neval );
38  CHECK_EQUAL( 0, ier );
39  }
40 
41  sys_float qagf(sys_float x)
42  {
43  sys_float ret_val;
44 
45  ret_val = 2.f / (sin(x * 10.f * sys_float(PI)) + 2.f);
46  return ret_val;
47  }
48 
49  TEST(TestQag)
50  {
51  sys_float a, b;
52  long ier, key;
53  long last, lenw;
54  sys_float work[400];
55  long neval, limit, iwork[100];
56  sys_float epsabs, abserr, epsrel, result;
57 
58  a = 0.f;
59  b = 1.f;
60  epsabs = 0.f;
61  epsrel = .001f;
62  key = 6;
63  limit = 100;
64  lenw = limit << 2;
65  qag_(E_fp_fp(qagf), &a, &b, &epsabs, &epsrel, &key, &result, &abserr, &
66  neval, &ier, &limit, &lenw, &last, iwork, work);
67  if (0) printf("QAG: Result=%e abserr=%e neval=%ld ier=%ld\n",
68  result,abserr,neval,ier);
69  CHECK( fp_equal_tol( result, 1.154701f, 1e-5f ) );
70  CHECK( abserr < 0.0008f );
71  CHECK_EQUAL( 183, neval );
72  CHECK_EQUAL( 0, ier );
73  }
74 
75  sys_float qagsf(sys_float x)
76  {
77  sys_float ret_val;
78 
79  ret_val = 0.f;
80  if (x > 0.f) {
81  ret_val = 1.f / sqrt(x);
82  }
83  return ret_val;
84  } /* qagsf_ */
85 
86  TEST(TestQags)
87  {
88  sys_float a, b;
89  long ier;
90  long last, lenw;
91  sys_float work[400];
92  long neval, limit, iwork[100];
93  sys_float epsabs, abserr, epsrel, result;
94 
95  a = 0.f;
96  b = 1.f;
97  epsabs = 0.f;
98  epsrel = .001f;
99  limit = 100;
100  lenw = limit << 2;
101  qags_(E_fp_fp(&qagsf),
102  &a, &b, &epsabs, &epsrel, &result, &abserr, &neval, &ier, &
103  limit, &lenw, &last, iwork, work);
104  if (0) printf("QAGS: Result=%e abserr=%e neval=%ld ier=%ld\n",
105  result,abserr,neval,ier);
106  CHECK( fp_equal_tol( result, 2.f, 1e-5f ) );
107  CHECK( fp_equal_tol( abserr, 5.841255e-6f, 1e-8f ) );
108  CHECK_EQUAL( 231, neval );
109  CHECK_EQUAL( 0, ier );
110  }
111 
112  sys_float qagpf(sys_float x)
113  {
114  sys_float ret_val, r__1, r__2;
115  double d__1, d__2;
116  const double c_b13 = -.25;
117  const double c_b14 = -.55;
118 
119  ret_val = 0.f;
120  if (x != 1.f/7.f && x != 2.f/3.f) {
121  d__1 = (r__1 = x - 1.f/7.f, fabs(r__1));
122  d__2 = (r__2 = x - 2.f/3.f, fabs(r__2));
123  ret_val = pow(d__1, c_b13) * pow(d__2, c_b14);
124  }
125  return ret_val;
126  }
127 
128  TEST(TestQagp)
129  {
130  sys_float a, b;
131  long ier;
132  long last, lenw;
133  sys_float work[404];
134  long npts2;
135  long neval, leniw, limit, iwork[204];
136  sys_float epsabs, abserr, epsrel, points[4], result;
137 
138  a = 0.f;
139  b = 1.f;
140  npts2 = 4;
141  points[0] = 1.f/7.f;
142  points[1] = 2.f/3.f;
143  epsabs = 0.0;
144  epsrel = 1e-3;
145  limit = 100;
146  leniw = (limit << 1) + npts2;
147  lenw = (limit << 2) + npts2;
148  qagp_(E_fp_fp(qagpf),
149  &a, &b, &npts2, points, &epsabs, &epsrel, &result, &
150  abserr, &neval, &ier, &leniw, &lenw, &last, iwork, work);
151  if (0) printf("QAGP: Result=%e abserr=%e neval=%ld ier=%ld\n",
152  result,abserr,neval,ier);
153  CHECK( fp_equal_tol( result, 4.253580f, 1e-5f ) );
154  CHECK( abserr < 8.5e-4f );
155  CHECK_EQUAL( neval , 861 );
156  CHECK_EQUAL( ier, 0 );
157  }
158 
159  sys_float qagif(sys_float x)
160  {
161  sys_float ret_val;
162 
163  ret_val = 0.f;
164  if (x > 0.f) {
165  ret_val = sqrt(x) * log(x) / ((x + 1.f) * (x + 2.f));
166  }
167  return ret_val;
168  } /* qagif_ */
169 
170  TEST(TestQagi)
171  {
172  long inf, ier;
173  sys_float boun;
174  long last, lenw;
175  sys_float work[400];
176  long neval, limit, iwork[100];
177  sys_float epsabs, abserr, epsrel, result;
178 
179  boun = 0.f;
180  inf = 1;
181  epsabs = 0.f;
182  epsrel = .001f;
183  limit = 100;
184  lenw = limit << 2;
185  qagi_(E_fp_fp(qagif),
186  &boun, &inf, &epsabs, &epsrel, &result, &abserr, &
187  neval, &ier, &limit, &lenw, &last, iwork, work);
188  if (0) printf("QAGI: Result=%e abserr=%e neval=%ld ier=%ld\n",
189  result,abserr,neval,ier);
190  CHECK( fp_equal_tol( result, 3.079564f, 1e-4f ) );
191  CHECK( abserr < 9.e-4f );
192  CHECK_EQUAL( 315, neval );
193  CHECK_EQUAL( 0, ier );
194  } /* tqagi_ */
195 
196  sys_float qawof(sys_float x)
197  {
198  sys_float ret_val;
199 
200  ret_val = 0.f;
201  if (x > 0.f) {
202  ret_val = exp(-(x)) * log(x);
203  }
204  return ret_val;
205  } /* qawof_ */
206 
207  TEST(TestQawo)
208  {
209  sys_float a, b;
210  long ier, last, lenw;
211  sys_float work[925];
212  long maxp1;
213  sys_float omega;
214  long neval;
215  long leniw, limit, iwork[200];
216  sys_float epsabs, abserr;
217  long integr;
218  sys_float epsrel, result;
219 
220  a = 0.f;
221  b = 1.f;
222  omega = 10.f;
223  integr = 1;
224  epsabs = 0.f;
225  epsrel = .001f;
226  limit = 100;
227  leniw = limit << 1;
228  maxp1 = 21;
229  lenw = (limit << 2) + maxp1 * 25;
230  qawo_(E_fp_fp(qawof),
231  &a, &b, &omega, &integr, &epsabs, &epsrel, &result, &
232  abserr, &neval, &ier, &leniw, &maxp1, &lenw, &last, iwork, work);
233  if (0) printf("QAWO: Result=%e abserr=%e neval=%ld ier=%ld\n",
234  result,abserr,neval,ier);
235  CHECK( fp_equal_tol( result, -1.776392e-1f, 1e-5f ) );
236  CHECK( abserr < 2.e-7f );
237  CHECK_EQUAL( neval , 255 );
238  CHECK_EQUAL( ier, 0 );
239  } /* tqawo_ */
240 
241 
242  sys_float qawff(sys_float x)
243  {
244  sys_float ret_val=0.f;
245 
246  if (x > 0.f) {
247  ret_val = sin(x * 50.f) / (x * sqrt(x));
248  }
249  return ret_val;
250  } /* qawff_ */
251 
252  TEST(TestQawf)
253  {
254  sys_float a;
255  long ier, lst;
256  long lenw;
257  sys_float work[1025];
258  long maxp1;
259  sys_float omega;
260  long neval, leniw, limit, iwork[250];
261  sys_float epsabs, abserr;
262  long integr, limlst;
263  sys_float result;
264 
265  a = 0.f;
266  omega = 8.f;
267  integr = 2;
268  epsabs = .001f;
269  limlst = 50;
270  limit = 100;
271  leniw = (limit << 1) + limlst;
272  maxp1 = 21;
273  lenw = (leniw << 1) + maxp1 * 25;
274  qawf_(E_fp_fp(qawff), &a, &omega, &integr, &epsabs, &result, &abserr, &
275  neval, &ier, &limlst, &lst, &leniw, &maxp1, &lenw, iwork, work);
276  if (0) printf("QAWF: Result=%e abserr=%e neval=%ld ier=%ld\n",
277  result,abserr,neval,ier);
278  CHECK( fp_equal_tol( result, 1.422553f, 1e-5f ) );
279  CHECK( abserr < 8e-4f );
280  CHECK_EQUAL( neval , 7110 );
281  CHECK_EQUAL( ier, 0 );
282  }
283 
284  sys_float qawsf(sys_float x)
285  {
286  sys_float ret_val;
287 
288  ret_val = sin(x * 10.f);
289  return ret_val;
290  } /* qawsf_ */
291 
292  TEST(TestQaws)
293  {
294  sys_float a, b;
295  long ier;
296  sys_float alfa, beta;
297  long last, lenw;
298  sys_float work[400];
299  long neval, limit;
300  long iwork[100];
301  sys_float epsabs, abserr;
302  long integr;
303  sys_float epsrel, result;
304 
305  a = 0.f;
306  b = 1.f;
307  alfa = -.5f;
308  beta = -.5f;
309  integr = 1;
310  epsabs = 0.f;
311  epsrel = .001f;
312  limit = 100;
313  lenw = limit << 2;
314  qaws_(E_fp_fp(qawsf),
315  &a, &b, &alfa, &beta, &integr, &epsabs, &epsrel, &
316  result, &abserr, &neval, &ier, &limit, &lenw, &last, iwork, work);
317  if (0) printf("QAWS: Result=%e abserr=%e neval=%ld ier=%ld\n",
318  result,abserr,neval,ier);
319  CHECK( fp_equal_tol( result, 5.350192e-1f, 1e-5f ) );
320  CHECK( abserr < 3e-7f );
321  CHECK_EQUAL( neval , 50 );
322  CHECK_EQUAL( ier, 0 );
323  } /* tqaws_ */
324 
325  sys_float qawcf(sys_float x)
326  {
327  sys_float ret_val;
328 
329  ret_val = 1.f / (x * x + 1e-4f);
330  return ret_val;
331  } /* qawcf_ */
332 
333  TEST(TestQawc)
334  {
335  sys_float a, b, c__;
336  long ier;
337  long last, lenw;
338  sys_float work[400];
339  long neval, limit, iwork[100];
340  sys_float epsabs, abserr, epsrel, result;
341 
342  a = -1.f;
343  b = 1.f;
344  c__ = .5f;
345  epsabs = 0.f;
346  epsrel = .001f;
347  limit = 100;
348  lenw = limit << 2;
349  qawc_(E_fp_fp(qawcf),
350  &a, &b, &c__, &epsabs, &epsrel, &result, &abserr, &
351  neval, &ier, &limit, &lenw, &last, iwork, work);
352  if (0) printf("QAWC: Result=%e abserr=%e neval=%ld ier=%ld\n",
353  result,abserr,neval,ier);
354  CHECK( fp_equal_tol( result, -6.284617e2f, 1e-3f ) );
355  CHECK( abserr < 1.7e-1f );
356  CHECK_EQUAL( neval , 225 );
357  CHECK_EQUAL( ier, 0 );
358  } /* tqawc_ */
359 
360  double dqngf(double x)
361  {
362  double ret_val;
363 
364  ret_val = exp(x) / (x * x + 1.);
365  return ret_val;
366  } /* dqngf_ */
367 
368  TEST(TestDQng)
369  {
370  double a, b;
371  long ier;
372  long neval;
373  double epsabs, abserr, epsrel, result;
374 
375  a = 0.;
376  b = 1.;
377  epsabs = 0.;
378  epsrel = .001;
379  dqng_(D_fp_fp(dqngf),
380  &a, &b, &epsabs, &epsrel, &result, &abserr, &neval, &ier);
381  if (0) printf("DQNG: Result=%.8g abserr=%.8g neval=%ld ier=%ld\n",
382  result,abserr,neval,ier);
383  CHECK( fp_equal_tol( result, 1.2707241, 1e-5) );
384  CHECK( fp_equal_tol( abserr, 1.4107872e-14, 1e-15) );
385  CHECK_EQUAL( neval , 21 );
386  CHECK_EQUAL( ier, 0 );
387  } /* tdqngf_ */
388 
389  double dqagf(double x)
390  {
391  double ret_val;
392 
393  ret_val = 2. / (sin(x * 10.0 * PI) + 2.0);
394  return ret_val;
395  } /* dqagf_ */
396 
397  TEST(TestDQag)
398  {
399  double a, b;
400  long ier, key;
401  long last, lenw;
402  double work[400];
403  long neval, limit, iwork[100];
404  double epsabs, abserr, epsrel, result;
405 
406  a = 0.;
407  b = 1.;
408  epsabs = 0.;
409  epsrel = .001;
410  key = 6;
411  limit = 100;
412  lenw = limit << 2;
413  dqag_(D_fp_fp(dqagf),
414  &a, &b, &epsabs, &epsrel, &key, &result, &abserr, &
415  neval, &ier, &limit, &lenw, &last, iwork, work);
416  if (0) printf("DQAG: Result=%e abserr=%e neval=%ld ier=%ld\n",
417  result,abserr,neval,ier);
418  CHECK( fp_equal_tol( result, 1.154701, 1e-5) );
419  CHECK( fp_equal_tol( abserr, 7.609303e-4, 1e-7) );
420  CHECK_EQUAL( neval , 183 );
421  CHECK_EQUAL( ier, 0 );
422  } /* tdqagf_ */
423 
424  double dqagsf(double x)
425  {
426  double ret_val;
427 
428  ret_val = 0.;
429  if (x > 0.) {
430  ret_val = 1. / sqrt(x);
431  }
432  return ret_val;
433  } /* dqagsf_ */
434 
435  TEST(TestDQags)
436  {
437  double a, b;
438  long ier;
439  long last, lenw;
440  double work[400];
441  long neval, limit, iwork[100];
442  double epsabs, abserr, epsrel, result;
443 
444  a = 0.;
445  b = 1.;
446  epsabs = 0.;
447  epsrel = .001;
448  limit = 100;
449  lenw = limit << 2;
450  dqags_(D_fp_fp(&dqagsf),
451  &a, &b, &epsabs, &epsrel, &result, &abserr, &neval, &ier, &
452  limit, &lenw, &last, iwork, work);
453  if (0) printf("DQAGS: Result=%e abserr=%e neval=%ld ier=%ld\n",
454  result,abserr,neval,ier);
455  CHECK( fp_equal_tol( result, 2., 1e-5) );
456  CHECK( abserr < 6.e-15 );
457  CHECK_EQUAL( 231, neval );
458  CHECK_EQUAL( 0, ier );
459  } /* tdqags_ */
460 
461  double dqagpf(double x)
462  {
463  double ret_val, r__1, r__2;
464  double d__1, d__2;
465  const double c_b13 = -.25;
466  const double c_b14 = -.55;
467 
468  ret_val = 0.f;
469  if (x != 1./7. && x != 2./3.) {
470  d__1 = (r__1 = x - 1./7., fabs(r__1));
471  d__2 = (r__2 = x - 2./3., fabs(r__2));
472  ret_val = pow(d__1, c_b13) * pow(d__2, c_b14);
473  }
474  return ret_val;
475  } /* dqagpf_ */
476 
477  TEST(TestDQagp)
478  {
479  double a, b;
480  long ier;
481  long last, lenw;
482  double work[404];
483  long npts2;
484  long neval, leniw, limit, iwork[204];
485  double epsabs, abserr, epsrel, points[4], result;
486 
487  a = 0.;
488  b = 1.;
489  npts2 = 4;
490  points[0] = 1./7.;
491  points[1] = 2./3.;
492  epsabs = 0.0;
493  epsrel = 1e-3;
494  limit = 100;
495  leniw = (limit << 1) + npts2;
496  lenw = (limit << 2) + npts2;
497  dqagp_(D_fp_fp(dqagpf),
498  &a, &b, &npts2, points, &epsabs, &epsrel, &result, &
499  abserr, &neval, &ier, &leniw, &lenw, &last, iwork, work);
500  if (0) printf("DQAGP: Result=%e abserr=%e neval=%ld ier=%ld\n",
501  result,abserr,neval,ier);
502  CHECK( fp_equal_tol( result, 4.253688, 1e-5) );
503  CHECK( fp_equal_tol( abserr, 8.758089e-4, 1e-8) );
504  CHECK_EQUAL( 861, neval );
505  CHECK_EQUAL( 0, ier );
506  } /* tdqagp_ */
507 
508  double dqagif(double x)
509  {
510  double ret_val;
511 
512  ret_val = 0.;
513  if (x > 0.) {
514  ret_val = sqrt(x) * log(x) / ((x + 1.) * (x + 2.));
515  }
516  return ret_val;
517  } /* dqagif_ */
518 
519  TEST(TestDQagi)
520  {
521  long inf, ier;
522  double boun;
523  long last, lenw;
524  double work[400];
525  long neval, limit, iwork[100];
526  double epsabs, abserr, epsrel, result;
527 
528  boun = 0.;
529  inf = 1;
530  epsabs = 0.;
531  epsrel = .001;
532  limit = 100;
533  lenw = limit << 2;
534  dqagi_(D_fp_fp(dqagif),
535  &boun, &inf, &epsabs, &epsrel, &result, &abserr, &
536  neval, &ier, &limit, &lenw, &last, iwork, work);
537  if (0) printf("DQAGI: Result=%e abserr=%e neval=%ld ier=%ld\n",
538  result,abserr,neval,ier);
539  CHECK( fp_equal_tol( result, 3.079555, 1e-5) );
540  CHECK( fp_equal_tol( abserr, 7.775459e-4, 1e-8) );
541  CHECK_EQUAL( 315, neval );
542  CHECK_EQUAL( 0, ier );
543  } /* tdqagi_ */
544 
545  double dqawof(double x)
546  {
547  double ret_val;
548 
549  ret_val = 0.;
550  if (x > 0.) {
551  ret_val = exp(-(x)) * log(x);
552  }
553  return ret_val;
554  } /* dqawof_ */
555 
556  TEST(TestDQawo)
557  {
558  double a, b;
559  long ier, last, lenw;
560  double work[925];
561  long maxp1;
562  double omega;
563  long neval;
564  long leniw, limit, iwork[200];
565  double epsabs, abserr;
566  long integr;
567  double epsrel, result;
568 
569  a = 0.;
570  b = 1.;
571  omega = 10.;
572  integr = 1;
573  epsabs = 0.;
574  epsrel = .001;
575  limit = 100;
576  leniw = limit << 1;
577  maxp1 = 21;
578  lenw = (limit << 2) + maxp1 * 25;
579  dqawo_(D_fp_fp(dqawof),
580  &a, &b, &omega, &integr, &epsabs, &epsrel, &result, &
581  abserr, &neval, &ier, &leniw, &maxp1, &lenw, &last, iwork, work);
582  if (0) printf("DQAWO: Result=%e abserr=%e neval=%ld ier=%ld\n",
583  result,abserr,neval,ier);
584  CHECK( fp_equal_tol( result, -1.776392e-1, 1e-5) );
585  CHECK( fp_equal_tol( abserr, 2.816840e-8, 1e-10) );
586  CHECK_EQUAL( 255 , neval );
587  CHECK_EQUAL( 0 , ier );
588  } /* tdqawo_ */
589 
590  double dqawff(double x)
591  {
592  double ret_val=0.0;
593 
594  if (x > 0.f) {
595  ret_val = sin(x * 50.) / (x * sqrt(x));
596  }
597  return ret_val;
598  } /* dqawff_ */
599 
600  TEST(TestDQawf)
601  {
602  double a;
603  long ier, lst;
604  long lenw;
605  double work[1025];
606  long maxp1;
607  double omega;
608  long neval, leniw, limit, iwork[250];
609  double epsabs, abserr;
610  long integr, limlst;
611  double result;
612 
613  a = 0.;
614  omega = 8.;
615  integr = 2;
616  epsabs = .001;
617  limlst = 50;
618  limit = 100;
619  leniw = (limit << 1) + limlst;
620  maxp1 = 21;
621  lenw = (leniw << 1) + maxp1 * 25;
622  dqawf_(D_fp_fp(dqawff),
623  &a, &omega, &integr, &epsabs, &result, &abserr, &
624  neval, &ier, &limlst, &lst, &leniw, &maxp1, &lenw, iwork, work);
625  if (0) printf("DQAWF: Result=%e abserr=%e neval=%ld ier=%ld\n",
626  result,abserr,neval,ier);
627  CHECK( fp_equal_tol( result, 1.422552, 1e-5) );
628  CHECK( fp_equal_tol( abserr, 8.448439e-4, 1e-7) );
629  CHECK_EQUAL( 7080, neval );
630  CHECK_EQUAL( 0, ier );
631  } /* tdqawf_ */
632 
633  double dqawsf(double x)
634  {
635  double ret_val;
636 
637  ret_val = sin(x * 10.);
638  return ret_val;
639  } /* dqawsf_ */
640 
641  TEST(TestDQaws)
642  {
643  double a, b;
644  long ier;
645  double alfa, beta;
646  long last, lenw;
647  double work[400];
648  long neval, limit;
649  long iwork[100];
650  double epsabs, abserr;
651  long integr;
652  double epsrel, result;
653 
654  a = 0.;
655  b = 1.;
656  alfa = -.5;
657  beta = -.5;
658  integr = 1;
659  epsabs = 0.;
660  epsrel = .001;
661  limit = 100;
662  lenw = limit << 2;
663  dqaws_(D_fp_fp(dqawsf),
664  &a, &b, &alfa, &beta, &integr, &epsabs, &epsrel, &
665  result, &abserr, &neval, &ier, &limit, &lenw, &last, iwork, work);
666  if (0) printf("DQAWS: Result=%e abserr=%e neval=%ld ier=%ld\n",
667  result,abserr,neval,ier);
668  CHECK( fp_equal_tol( result, 5.350191e-1, 1e-5) );
669  CHECK( fp_equal_tol( abserr, 1.936312e-12, 1e-14) );
670  CHECK_EQUAL( 50, neval );
671  CHECK_EQUAL( 0, ier );
672  } /* tdqaws_ */
673 
674  double dqawcf(double x)
675  {
676  double ret_val;
677 
678  ret_val = 1. / (x * x + 1e-4);
679  return ret_val;
680  } /* dqawcf_ */
681 
682  TEST(TestDQawc)
683  {
684  double a, b, c__;
685  long ier;
686  long last, lenw;
687  double work[400];
688  long neval, limit, iwork[100];
689  double epsabs, abserr, epsrel, result;
690 
691  a = -1.;
692  b = 1.;
693  c__ = .5;
694  epsabs = 0.;
695  epsrel = .001;
696  limit = 100;
697  lenw = limit << 2;
698  dqawc_(D_fp_fp(dqawcf),
699  &a, &b, &c__, &epsabs, &epsrel, &result, &abserr, &
700  neval, &ier, &limit, &lenw, &last, iwork, work);
701  if (0) printf("DQAWC: Result=%e abserr=%e neval=%ld ier=%ld\n",
702  result,abserr,neval,ier);
703  CHECK( fp_equal_tol( result, -6.284617e2, 1e-3) );
704  CHECK( fp_equal_tol( abserr, 1.62477e-1, 1e-3) );
705  CHECK( neval <= 255 );
706  CHECK_EQUAL( 0, ier );
707  } /* tdqawc_ */
708 
709 }
void dqag_(const D_fp &f, const double *a, const double *b, const double *epsabs, const double *epsrel, const long *key, double *result, double *abserr, long *neval, long *ier, long *limit, const long *lenw, long *last, long *iwork, double *work)
bool fp_equal_tol(sys_float x, sys_float y, sys_float tol)
Definition: cddefines.h:904
void dqagp_(const D_fp &f, const double *a, const double *b, const long *npts2, const double *points, const double *epsabs, const double *epsrel, double *result, double *abserr, long *neval, long *ier, const long *leniw, const long *lenw, long *last, long *iwork, double *work)
void dqawc_(const D_fp &f, const double *a, const double *b, const double *c__, const double *epsabs, const double *epsrel, double *result, double *abserr, long *neval, long *ier, long *limit, const long *lenw, long *last, long *iwork, double *work)
void qaws_(const E_fp &f, const sys_float *a, const sys_float *b, const sys_float *alfa, const sys_float *beta, const long *integr, const sys_float *epsabs, const sys_float *epsrel, sys_float *result, sys_float *abserr, long *neval, long *ier, const long *limit, const long *lenw, long *last, long *iwork, sys_float *work)
void dqawo_(const D_fp &f, const double *a, const double *b, const double *omega, const long *integr, const double *epsabs, const double *epsrel, double *result, double *abserr, long *neval, long *ier, const long *leniw, long *maxp1, const long *lenw, long *last, long *iwork, double *work)
void dqags_(const D_fp &f, const double *a, const double *b, const double *epsabs, const double *epsrel, double *result, double *abserr, long *neval, long *ier, const long *limit, const long *lenw, long *last, long *iwork, double *work)
float sys_float
Definition: cddefines.h:127
void dqawf_(const D_fp &f, const double *a, const double *omega, const long *integr, const double *epsabs, double *result, double *abserr, long *neval, long *ier, long *limlst, long *lst, const long *leniw, const long *maxp1, const long *lenw, long *iwork, double *work)
void qawo_(const E_fp &f, const sys_float *a, const sys_float *b, const sys_float *omega, const long *integr, const sys_float *epsabs, const sys_float *epsrel, sys_float *result, sys_float *abserr, long *neval, long *ier, const long *leniw, const long *maxp1, const long *lenw, long *last, long *iwork, sys_float *work)
void dqaws_(const D_fp &f, const double *a, const double *b, const double *alfa, const double *beta, const long *integr, const double *epsabs, const double *epsrel, double *result, double *abserr, long *neval, long *ier, long *limit, const long *lenw, long *last, long *iwork, double *work)
void dqng_(const D_fp &f, const double *a, const double *b, const double *epsabs, const double *epsrel, double *result, double *abserr, long *neval, long *ier)
void qawc_(const E_fp &f, const sys_float *a, const sys_float *b, const sys_float *c__, const sys_float *epsabs, const sys_float *epsrel, sys_float *result, sys_float *abserr, long *neval, long *ier, long *limit, const long *lenw, long *last, long *iwork, sys_float *work)
void qags_(const E_fp &f, const sys_float *a, const sys_float *b, const sys_float *epsabs, const sys_float *epsrel, sys_float *result, sys_float *abserr, long *neval, long *ier, const long *limit, const long *lenw, long *last, long *iwork, sys_float *work)
void qagp_(const E_fp &f, const sys_float *a, const sys_float *b, const long *npts2, const sys_float *points, const sys_float *epsabs, const sys_float *epsrel, sys_float *result, sys_float *abserr, long *neval, long *ier, const long *leniw, const long *lenw, long *last, long *iwork, sys_float *work)
void qawf_(const E_fp &f, const sys_float *a, const sys_float *omega, const long *integr, const sys_float *epsabs, sys_float *result, sys_float *abserr, long *neval, long *ier, const long *limlst, long *lst, const long *leniw, const long *maxp1, const long *lenw, long *iwork, sys_float *work)
void dqagi_(const D_fp &f, const double *bound, const long *inf, const double *epsabs, const double *epsrel, double *result, double *abserr, long *neval, long *ier, long *limit, const long *lenw, long *last, long *iwork, double *work)
double e2(double x)
void qag_(const E_fp &f, const sys_float *a, const sys_float *b, const sys_float *epsabs, const sys_float *epsrel, const long *key, sys_float *result, sys_float *abserr, long *neval, long *ier, long *limit, const long *lenw, long *last, long *iwork, sys_float *work)
void qagi_(const E_fp &f, const sys_float *bound, const long *inf, const sys_float *epsabs, const sys_float *epsrel, sys_float *result, sys_float *abserr, long *neval, long *ier, const long *limit, const long *lenw, long *last, long *iwork, sys_float *work)
void qng_(const E_fp &f, sys_float *a, sys_float *b, sys_float *epsabs, sys_float *epsrel, sys_float *result, sys_float *abserr, long *neval, long *ier)