1 /*
2 file automatically generated by make_test_files.pl
3 Tue Apr 19 14:01:02 2011
4 */
5
6 /*****************************************************************************
7 * *
8 * UNU.RAN -- Universal Non-Uniform Random number generator *
9 * *
10 *****************************************************************************/
11
12 /**
13 ** Tests for CSTD
14 **/
15
16 /*---------------------------------------------------------------------------*/
17 #include "testunuran.h"
18
19 #ifdef UNUR_URNG_DEFAULT_RNGSTREAM
20 #include <RngStream.h>
21 #endif
22 /*---------------------------------------------------------------------------*/
23
24 /*---------------------------------------------------------------------------*/
25 /* global variables */
26
27 static FILE *TESTLOG; /* test log file */
28 static FILE *UNURANLOG; /* unuran log file */
29
30 static int test_ok = TRUE; /* all tests ok (boolean) */
31 static int fullcheck = FALSE; /* whether all checks are performed */
32
33 static TIMER watch; /* stop watch */
34
35 /*---------------------------------------------------------------------------*/
36
37 void run_verify_generator( FILE *LOG, int line, UNUR_PAR *par );
38
39 int unur_cstd_set_verify( UNUR_PAR *par, int verify);
40
41
42 /*---------------------------------------------------------------------------*/
43
44 void test_new (void);
45 void test_set (void);
46 void test_get (void);
47 void test_chg (void);
48 void test_init (void);
49 void test_reinit (void);
50 void test_sample (void);
51 void test_validate (void);
52 void test_special(void);
53
54 /*---------------------------------------------------------------------------*/
55
56
57
58 /* -- prototypes -- */
59
60 int estimate_uerror( UNUR_DISTR *distr, double u_resolution, int samplesize );
61
62 double cdf_exp(double x, const UNUR_DISTR *distr);
63 double invcdf_exp(double u, const UNUR_DISTR *distr);
64
65 /* -- constants -- */
66
67 /* sample size */
68 static const int UERROR_SAMPLESIZE = 100000;
69 static const double UERROR_RESOLUTION = 1.e-14;
70
71 #define COMPARE_SAMPLE_SIZE (500)
72 #define VIOLATE_SAMPLE_SIZE (20)
73
74
75
76
77 /*---------------------------------------------------------------------------*/
78
79 #ifndef CHI2_FAILURES_TOLERATED
80 # define CHI2_FAILURES_TOLERATED DEFAULT_CHI2_FAILURES_TOLERATED
81 #endif
82
83 /*---------------------------------------------------------------------------*/
84 /* [verbatim] */
85
86
87
88
89 int
estimate_uerror(UNUR_DISTR * distr,double u_resolution,int samplesize)90 estimate_uerror( UNUR_DISTR *distr, /* distribution object */
91 double u_resolution, /* maximal tolerated u-error */
92 int samplesize ) /* sample size for error experiment */
93 /* returns 0 if maxerror < u_resolution, errorcode otherwise */
94 {
95 UNUR_PAR *par;
96 UNUR_GEN *gen;
97 int i, nfpar;
98 const double *fpar;
99 double score;
100
101 /* print data about distribution */
102 fprintf(TESTLOG,"> %s (",unur_distr_get_name(distr));
103 nfpar = unur_distr_cont_get_pdfparams(distr,&fpar);
104 for(i=0;i<nfpar;i++) fprintf(TESTLOG,"%s %g", (i?",":""), fpar[i]);
105 fprintf(TESTLOG,")\n");
106
107 /* create parameter object for inversion method */
108 par = unur_cstd_new(distr);
109 if (par==NULL ||
110 unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) {
111 fprintf(TESTLOG,"\t--> inversion method not implemented !!\n\n");
112 printf("0"); fflush(stdout);
113 if (par) unur_par_free(par);
114 unur_distr_free(distr);
115 return 0;
116 }
117
118 /* initialize generator object */
119 gen = unur_init(par);
120
121 /* run test */
122 score = run_validate_u_error( TESTLOG, gen, distr, u_resolution, samplesize );
123
124 /* clear working space */
125 unur_distr_free(distr);
126 unur_free(gen);
127
128 /* return */
129 fprintf(TESTLOG,"\n");
130 return score;
131
132 } /* end of estimate_uerror() */
133
134
cdf_exp(double x,const UNUR_DISTR * distr ATTRIBUTE__UNUSED)135 double cdf_exp(double x, const UNUR_DISTR *distr ATTRIBUTE__UNUSED) {
136 return ((x<0.) ? 0. : 1.-exp(-x));
137 }
138
invcdf_exp(double u,const UNUR_DISTR * distr ATTRIBUTE__UNUSED)139 double invcdf_exp(double u, const UNUR_DISTR *distr ATTRIBUTE__UNUSED) {
140 return (-log(1.- u));
141 }
142
143 /*---------------------------------------------------------------------------*/
144 /* [new] */
145
test_new(void)146 void test_new (void)
147 {
148 int n_tests_failed; /* number of failed tests */
149
150 /* start test */
151 printf("[new "); fflush(stdout);
152 fprintf(TESTLOG,"\n[new]\n");
153
154 /* reset counter */
155 n_tests_failed = 0;
156
157 /* set stop watch */
158 stopwatch_lap(&watch);
159
160 { /* invalid NULL ptr */
161 UNUR_DISTR *distr = NULL;
162 distr = NULL;
163
164
165 unur_reset_errno();
166 n_tests_failed += (check_expected_NULL(TESTLOG,37,(unur_cstd_new( distr )))==UNUR_SUCCESS)?0:1;
167 n_tests_failed += (check_errorcode(TESTLOG,37,UNUR_ERR_NULL)==UNUR_SUCCESS)?0:1;
168 unur_distr_free(distr);
169 }
170
171 { /* invalid distribution type */
172 UNUR_DISTR *distr = NULL;
173 distr = unur_distr_discr_new();
174
175
176 unur_reset_errno();
177 n_tests_failed += (check_expected_NULL(TESTLOG,43,(unur_cstd_new( distr )))==UNUR_SUCCESS)?0:1;
178 n_tests_failed += (check_errorcode(TESTLOG,43,UNUR_ERR_DISTR_INVALID)==UNUR_SUCCESS)?0:1;
179 unur_distr_free(distr);
180 }
181
182 { /* not a standard distribution and missing inverse CDF */
183 UNUR_DISTR *distr = NULL;
184 distr = unur_distr_cont_new();
185
186
187 unur_reset_errno();
188 n_tests_failed += (check_expected_NULL(TESTLOG,49,(unur_cstd_new( distr )))==UNUR_SUCCESS)?0:1;
189 n_tests_failed += (check_errorcode(TESTLOG,49,UNUR_ERR_DISTR_REQUIRED)==UNUR_SUCCESS)?0:1;
190 unur_distr_free(distr);
191 }
192
193
194 /* timing */
195 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
196
197 /* test finished */
198 test_ok &= (n_tests_failed) ? 0 : 1;
199 (n_tests_failed) ? printf(" ==> failed] ") : printf(" ==> ok] ");
200
201 } /* end of test_new() */
202
203 /*---------------------------------------------------------------------------*/
204 /* [set] */
205
test_set(void)206 void test_set (void)
207 {
208 int n_tests_failed; /* number of failed tests */
209
210 /* start test */
211 printf("[set "); fflush(stdout);
212 fprintf(TESTLOG,"\n[set]\n");
213
214 /* reset counter */
215 n_tests_failed = 0;
216
217 /* set stop watch */
218 stopwatch_lap(&watch);
219
220 { /* invalid NULL ptr */
221 UNUR_PAR *par = NULL;
222 par = NULL;
223
224
225 unur_reset_errno();
226 n_tests_failed += (check_expected_setfailed(TESTLOG,59,(unur_cstd_set_variant(par,1)))==UNUR_SUCCESS)?0:1;
227 n_tests_failed += (check_errorcode(TESTLOG,59,UNUR_ERR_NULL)==UNUR_SUCCESS)?0:1;
228 }
229
230 { /* invalid parameter object */
231 UNUR_DISTR *distr = NULL;
232 UNUR_PAR *par = NULL;
233 double fpar[2] = {0.,1.};
234 distr = unur_distr_normal(fpar,2);
235 par = unur_arou_new(distr);
236
237
238 unur_reset_errno();
239 n_tests_failed += (check_expected_setfailed(TESTLOG,67,(unur_cstd_set_variant(par,1)))==UNUR_SUCCESS)?0:1;
240 n_tests_failed += (check_errorcode(TESTLOG,67,UNUR_ERR_PAR_INVALID)==UNUR_SUCCESS)?0:1;
241 unur_par_free(par);
242 unur_distr_free(distr);
243 }
244
245 { /* invalid parameters */
246 UNUR_DISTR *distr = NULL;
247 UNUR_PAR *par = NULL;
248 distr = unur_distr_normal(NULL,0);
249 par = unur_cstd_new(distr);
250
251
252 unur_reset_errno();
253 n_tests_failed += (check_expected_setfailed(TESTLOG,76,(unur_cstd_set_variant(par,9999)))==UNUR_SUCCESS)?0:1;
254 n_tests_failed += (check_errorcode(TESTLOG,76,UNUR_ERR_PAR_VARIANT)==UNUR_SUCCESS)?0:1;
255 unur_par_free(par);
256 unur_distr_free(distr);
257 }
258
259
260 /* timing */
261 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
262
263 /* test finished */
264 test_ok &= (n_tests_failed) ? 0 : 1;
265 (n_tests_failed) ? printf(" ==> failed] ") : printf(" ==> ok] ");
266
267 } /* end of test_set() */
268
269 /*---------------------------------------------------------------------------*/
270 /* [chg] */
271
test_chg(void)272 void test_chg (void)
273 {
274 int n_tests_failed; /* number of failed tests */
275
276 /* start test */
277 printf("[chg "); fflush(stdout);
278 fprintf(TESTLOG,"\n[chg]\n");
279
280 /* reset counter */
281 n_tests_failed = 0;
282
283 /* set stop watch */
284 stopwatch_lap(&watch);
285
286 { /* invalid generator object */
287 UNUR_DISTR *distr = NULL;
288 UNUR_PAR *par = NULL;
289 UNUR_GEN *gen = NULL;
290 double fpar[2] = {0.,1.};
291 distr = unur_distr_normal(fpar,2);
292 par = unur_arou_new(distr);
293 unur_set_debug(par,0);
294 gen = unur_init( par );
295 abort_if_NULL(TESTLOG, 92, gen );
296
297
298 unur_reset_errno();
299 n_tests_failed += (check_expected_setfailed(TESTLOG,96,(unur_cstd_chg_truncated(gen, 0., 1.)))==UNUR_SUCCESS)?0:1;
300 n_tests_failed += (check_errorcode(TESTLOG,96,UNUR_ERR_GEN_INVALID)==UNUR_SUCCESS)?0:1;
301 unur_distr_free(distr);
302 unur_free(gen);
303 }
304
305
306 /* timing */
307 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
308
309 /* test finished */
310 test_ok &= (n_tests_failed) ? 0 : 1;
311 (n_tests_failed) ? printf(" ==> failed] ") : printf(" ==> ok] ");
312
313 } /* end of test_chg() */
314
315 /*---------------------------------------------------------------------------*/
316 /* [init] */
317
test_init(void)318 void test_init (void)
319 {
320 int n_tests_failed; /* number of failed tests */
321
322 /* start test */
323 printf("[init "); fflush(stdout);
324 fprintf(TESTLOG,"\n[init]\n");
325
326 /* reset counter */
327 n_tests_failed = 0;
328
329 /* set stop watch */
330 stopwatch_lap(&watch);
331
332 { /* invalid NULL ptr */
333 UNUR_PAR *par = NULL;
334 par = NULL;
335
336
337 unur_reset_errno();
338 n_tests_failed += (check_expected_NULL(TESTLOG,107,(unur_init( par )))==UNUR_SUCCESS)?0:1;
339 n_tests_failed += (check_errorcode(TESTLOG,107,UNUR_ERR_NULL)==UNUR_SUCCESS)?0:1;
340 }
341
342
343 /* timing */
344 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
345
346 /* test finished */
347 test_ok &= (n_tests_failed) ? 0 : 1;
348 (n_tests_failed) ? printf(" ==> failed] ") : printf(" ==> ok] ");
349
350 } /* end of test_init() */
351
352 /*---------------------------------------------------------------------------*/
353 /* [reinit] */
354
test_reinit(void)355 void test_reinit (void)
356 {
357 int n_tests_failed; /* number of failed tests */
358
359 /* start test */
360 printf("[reinit "); fflush(stdout);
361 fprintf(TESTLOG,"\n[reinit]\n");
362
363 /* reset counter */
364 n_tests_failed = 0;
365
366 /* set stop watch */
367 stopwatch_lap(&watch);
368
369 { /* does not exist */
370 UNUR_DISTR *distr = NULL;
371 UNUR_PAR *par = NULL;
372 UNUR_GEN *gen = NULL;
373 distr = unur_distr_normal(NULL,0);
374 par = unur_cstd_new(distr);
375 gen = unur_init( par );
376 abort_if_NULL(TESTLOG, 116, gen );
377
378
379 unur_reset_errno();
380 n_tests_failed += (check_expected_reinit(TESTLOG,120,(unur_reinit( gen )))==UNUR_SUCCESS)?0:1;
381 unur_distr_free(distr);
382 unur_free(gen);
383 }
384
385
386 /* timing */
387 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
388
389 /* test finished */
390 test_ok &= (n_tests_failed) ? 0 : 1;
391 (n_tests_failed) ? printf(" ==> failed] ") : printf(" ==> ok] ");
392
393 } /* end of test_reinit() */
394
395 /*---------------------------------------------------------------------------*/
396 /* [sample] */
397
test_sample(void)398 void test_sample (void)
399 {
400 int n_tests_failed; /* number of failed tests */
401
402 /* start test */
403 printf("[sample "); fflush(stdout);
404 fprintf(TESTLOG,"\n[sample]\n");
405
406 /* reset counter */
407 n_tests_failed = 0;
408
409 /* set stop watch */
410 stopwatch_lap(&watch);
411
412 { /* compare clone */
413 UNUR_DISTR *distr = NULL;
414 UNUR_PAR *par = NULL;
415 UNUR_GEN *gen = NULL;
416 UNUR_GEN *clone;
417 double fpar[] = { 1., 2.};
418 distr = unur_distr_normal(fpar,2);
419 par = NULL;
420 gen = NULL;
421
422
423 unur_reset_errno();
424 /* original generator object */
425 par = unur_cstd_new(distr);
426 gen = unur_init(par);
427 n_tests_failed += (compare_sequence_gen_start(TESTLOG,136,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
428
429 unur_reset_errno();
430 /* clone */
431 clone = unur_gen_clone(gen);
432 unur_free(gen);
433 gen = clone;
434 n_tests_failed += (compare_sequence_gen(TESTLOG,142,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
435 unur_distr_free(distr);
436 unur_free(gen);
437 }
438
439 { /* compare stringparser */
440 UNUR_DISTR *distr = NULL;
441 UNUR_PAR *par = NULL;
442 UNUR_GEN *gen = NULL;
443 double fpar[] = {3., 4.};
444 distr = NULL;
445 par = NULL;
446 gen = NULL;
447
448
449 unur_reset_errno();
450 distr = unur_distr_gamma(fpar,2);
451 par = unur_cstd_new(distr);
452 unur_cstd_set_variant(par,2);
453 gen = unur_init(par);
454 n_tests_failed += (compare_sequence_gen_start(TESTLOG,156,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
455
456 unur_reset_errno();
457 unur_free(gen); gen = NULL;
458 unur_distr_free(distr); distr = NULL;
459 gen = unur_str2gen( "gamma(3.,4.) & method = cstd; variant = 2" );
460 n_tests_failed += (compare_sequence_gen(TESTLOG,161,gen,COMPARE_SAMPLE_SIZE)==UNUR_SUCCESS)?0:1;
461 unur_distr_free(distr);
462 unur_free(gen);
463 }
464
465
466 /* timing */
467 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
468
469 /* test finished */
470 test_ok &= (n_tests_failed) ? 0 : 1;
471 (n_tests_failed) ? printf(" ==> failed] ") : printf(" ==> ok] ");
472
473 } /* end of test_sample() */
474
475 /*---------------------------------------------------------------------------*/
476 /* [validate] */
477
478 /*---------------------------------------------------------------------------*/
479
480 /* [validate] */
481
test_validate(void)482 void test_validate (void)
483 {
484 UNUR_DISTR *distr[80];
485 UNUR_PAR *par;
486 UNUR_GEN *gen;
487 int n_tests_failed;
488 int rcode;
489 double *darray;
490 double fpm[10];
491
492 rcode = 0;
493
494 /* start test */
495 printf("[validate "); fflush(stdout);
496 fprintf(TESTLOG,"\n[validate]\n");
497
498 /* reset counter */
499 n_tests_failed = 0;
500
501 /* set stop watch */
502 stopwatch_lap(&watch);
503
504
505 /* distributions: 80 */
506 {
507 fpm[0] = 1.;
508 fpm[1] = 2.;
509 distr[0] = unur_distr_beta(fpm,2);
510 }
511
512 {
513 fpm[0] = 1.;
514 fpm[1] = 5.;
515 distr[1] = unur_distr_beta(fpm,2);
516 }
517
518 {
519 fpm[0] = 7.;
520 fpm[1] = 0.1;
521 distr[60] = unur_distr_beta(fpm,2);
522 }
523
524 {
525 fpm[0] = 0.7;
526 fpm[1] = 0.1;
527 distr[61] = unur_distr_beta(fpm,2);
528 }
529
530 {
531 fpm[0] = 7.;
532 fpm[1] = 0.1;
533 fpm[2] = -1.;
534 fpm[3] = 2.;
535 distr[62] = unur_distr_beta(fpm,4);
536 }
537
538 {
539 fpm[0] = 1.;
540 fpm[1] = 100.;
541 distr[2] = unur_distr_beta(fpm,2);
542 }
543
544 {
545 fpm[0] = 3.;
546 fpm[1] = 4.;
547 distr[3] = unur_distr_beta(fpm,2);
548 }
549
550 {
551 fpm[0] = 5.;
552 fpm[1] = 100.;
553 distr[4] = unur_distr_beta(fpm,2);
554 }
555
556 {
557 fpm[0] = 500.;
558 fpm[1] = 300.;
559 distr[5] = unur_distr_beta(fpm,2);
560 }
561
562 {
563 fpm[0] = 5.;
564 fpm[1] = 10.;
565 fpm[2] = -3.;
566 fpm[3] = 15.;
567 distr[6] = unur_distr_beta(fpm,4);
568 }
569
570 {
571 fpm[0] = 1;
572 distr[66] = unur_distr_burr(fpm,1);
573 }
574
575 {
576 fpm[0] = 2;
577 fpm[1] = 2;
578 distr[67] = unur_distr_burr(fpm,2);
579 }
580
581 {
582 fpm[0] = 3;
583 fpm[1] = 2;
584 fpm[2] = 2;
585 distr[68] = unur_distr_burr(fpm,3);
586 }
587
588 {
589 fpm[0] = 4;
590 fpm[1] = 2;
591 fpm[2] = 2;
592 distr[69] = unur_distr_burr(fpm,3);
593 }
594
595 {
596 fpm[0] = 5;
597 fpm[1] = 2;
598 fpm[2] = 2;
599 distr[70] = unur_distr_burr(fpm,3);
600 }
601
602 {
603 fpm[0] = 6;
604 fpm[1] = 2;
605 fpm[2] = 2;
606 distr[71] = unur_distr_burr(fpm,3);
607 }
608
609 {
610 fpm[0] = 7;
611 fpm[1] = 2;
612 distr[72] = unur_distr_burr(fpm,2);
613 }
614
615 {
616 fpm[0] = 8;
617 fpm[1] = 2;
618 distr[73] = unur_distr_burr(fpm,2);
619 }
620
621 {
622 fpm[0] = 9;
623 fpm[1] = 2;
624 fpm[2] = 2;
625 distr[74] = unur_distr_burr(fpm,3);
626 }
627
628 {
629 fpm[0] = 10;
630 fpm[1] = 2;
631 distr[75] = unur_distr_burr(fpm,2);
632 }
633
634 {
635 fpm[0] = 11;
636 fpm[1] = 2;
637 distr[76] = unur_distr_burr(fpm,2);
638 }
639
640 {
641 fpm[0] = 12;
642 fpm[1] = 2;
643 fpm[2] = 2;
644 distr[77] = unur_distr_burr(fpm,3);
645 }
646
647 {
648 distr[7] = unur_distr_cauchy(NULL,0);
649 }
650
651 {
652 fpm[0] = 1.;
653 fpm[1] = 20.;
654 distr[8] = unur_distr_cauchy(fpm,2);
655 }
656
657 {
658 fpm[0] = 0.5;
659 distr[23] = unur_distr_chi(fpm,1);
660 }
661
662 {
663 fpm[0] = 1.;
664 distr[24] = unur_distr_chi(fpm,1);
665 }
666
667 {
668 fpm[0] = 2.;
669 distr[25] = unur_distr_chi(fpm,1);
670 }
671
672 {
673 fpm[0] = 50.;
674 distr[26] = unur_distr_chi(fpm,1);
675 }
676
677 {
678 distr[27] = unur_distr_exponential(NULL,0);
679 }
680
681 {
682 fpm[0] = 0.5;
683 distr[28] = unur_distr_exponential(fpm,1);
684 }
685
686 {
687 fpm[0] = 5.;
688 fpm[1] = -3.;
689 distr[29] = unur_distr_exponential(fpm,2);
690 }
691
692 {
693 distr[30] = unur_distr_extremeI(NULL,0);
694 }
695
696 {
697 fpm[0] = -3.;
698 distr[31] = unur_distr_extremeI(fpm,1);
699 }
700
701 {
702 fpm[0] = -1.;
703 fpm[1] = 5.;
704 distr[32] = unur_distr_extremeI(fpm,2);
705 }
706
707 {
708 fpm[0] = 3.;
709 distr[33] = unur_distr_extremeII(fpm,1);
710 }
711
712 {
713 fpm[0] = 0.5;
714 fpm[1] = -3.;
715 distr[34] = unur_distr_extremeII(fpm,2);
716 }
717
718 {
719 fpm[0] = 0.8;
720 fpm[1] = -1.;
721 fpm[2] = 5.;
722 distr[35] = unur_distr_extremeII(fpm,3);
723 }
724
725 {
726 fpm[0] = 1.;
727 distr[9] = unur_distr_gamma(fpm,1);
728 }
729
730 {
731 fpm[0] = 2.;
732 distr[10] = unur_distr_gamma(fpm,1);
733 }
734
735 {
736 fpm[0] = 3.;
737 distr[11] = unur_distr_gamma(fpm,1);
738 }
739
740 {
741 fpm[0] = 10.;
742 distr[12] = unur_distr_gamma(fpm,1);
743 }
744
745 {
746 fpm[0] = 1000.;
747 distr[13] = unur_distr_gamma(fpm,1);
748 }
749
750 {
751 fpm[0] = 5.;
752 fpm[1] = 1000.;
753 distr[14] = unur_distr_gamma(fpm,2);
754 }
755
756 {
757 fpm[0] = 5.;
758 fpm[1] = 1.e-5;
759 distr[15] = unur_distr_gamma(fpm,2);
760 }
761
762 {
763 fpm[0] = 5.;
764 fpm[1] = 10.;
765 fpm[2] = 1000;
766 distr[16] = unur_distr_gamma(fpm,3);
767 }
768
769 {
770 fpm[0] = 0.5;
771 distr[63] = unur_distr_gamma(fpm,1);
772 }
773
774 {
775 fpm[0] = 0.2;
776 distr[64] = unur_distr_gamma(fpm,1);
777 }
778
779 {
780 distr[36] = unur_distr_laplace(NULL,0);
781 }
782
783 {
784 fpm[0] = -3.;
785 distr[37] = unur_distr_laplace(fpm,1);
786 }
787
788 {
789 fpm[0] = -1.;
790 fpm[1] = 5.;
791 distr[38] = unur_distr_laplace(fpm,2);
792 }
793
794 {
795 distr[39] = unur_distr_logistic(NULL,0);
796 }
797
798 {
799 fpm[0] = -3.;
800 distr[40] = unur_distr_logistic(fpm,1);
801 }
802
803 {
804 fpm[0] = -1.;
805 fpm[1] = 5.;
806 distr[41] = unur_distr_logistic(fpm,2);
807 }
808
809 {
810 fpm[0] = 2.;
811 fpm[1] = 3.;
812 distr[56] = unur_distr_lomax(fpm,2);
813 }
814
815 {
816 fpm[0] = 20.;
817 fpm[1] = 0.4;
818 distr[57] = unur_distr_lomax(fpm,2);
819 }
820
821 {
822 fpm[0] = 0.2;
823 fpm[1] = 40.;
824 distr[58] = unur_distr_lomax(fpm,2);
825 }
826
827 {
828 fpm[0] = 0.2;
829 fpm[1] = 0.5;
830 distr[59] = unur_distr_lomax(fpm,2);
831 }
832
833 {
834 distr[17] = unur_distr_normal(NULL,0);
835 }
836
837 {
838 fpm[0] = 1.;
839 fpm[1] = 1.e-5;
840 distr[18] = unur_distr_normal(fpm,2);
841 }
842
843 {
844 fpm[0] = 0.;
845 fpm[1] = 1.e+5;
846 distr[19] = unur_distr_normal(fpm,2);
847 }
848
849 {
850 fpm[0] = 2.;
851 fpm[1] = 3.;
852 distr[52] = unur_distr_pareto(fpm,2);
853 }
854
855 {
856 fpm[0] = 20.;
857 fpm[1] = 0.4;
858 distr[53] = unur_distr_pareto(fpm,2);
859 }
860
861 {
862 fpm[0] = 0.2;
863 fpm[1] = 40.;
864 distr[54] = unur_distr_pareto(fpm,2);
865 }
866
867 {
868 fpm[0] = 0.2;
869 fpm[1] = 0.5;
870 distr[55] = unur_distr_pareto(fpm,2);
871 }
872
873 {
874 fpm[0] = 0.5;
875 distr[42] = unur_distr_powerexponential(fpm,1);
876 }
877
878 {
879 fpm[0] = 1.;
880 distr[43] = unur_distr_powerexponential(fpm,1);
881 }
882
883 {
884 fpm[0] = 2.;
885 distr[44] = unur_distr_powerexponential(fpm,1);
886 }
887
888 {
889 fpm[0] = 10.;
890 distr[45] = unur_distr_powerexponential(fpm,1);
891 }
892
893 {
894 fpm[0] = 0.7;
895 distr[46] = unur_distr_triangular(fpm,1);
896 }
897
898 {
899 fpm[0] = 0.;
900 distr[47] = unur_distr_triangular(fpm,1);
901 }
902
903 {
904 fpm[0] = 1.;
905 distr[48] = unur_distr_triangular(fpm,1);
906 }
907
908 {
909 distr[20] = unur_distr_uniform(NULL,0);
910 }
911
912 {
913 fpm[0] = 1.;
914 fpm[1] = 20.;
915 distr[21] = unur_distr_uniform(fpm,2);
916 }
917
918 {
919 fpm[0] = 3.;
920 distr[49] = unur_distr_weibull(fpm,1);
921 }
922
923 {
924 fpm[0] = 0.5;
925 fpm[1] = 3.;
926 distr[50] = unur_distr_weibull(fpm,2);
927 }
928
929 {
930 fpm[0] = 1.5;
931 fpm[1] = 2.;
932 fpm[2] = -5.;
933 distr[51] = unur_distr_weibull(fpm,3);
934 }
935
936 {
937 fpm[0] = 1.;
938 distr[65] = unur_distr_rayleigh(fpm,1);
939 }
940
941 {
942 distr[22] = unur_distr_cauchy(NULL,0);
943 unur_distr_cont_set_domain(distr[22],0.1,1.);
944 unur_distr_cont_upd_mode(distr[22]);
945 unur_distr_cont_upd_pdfarea(distr[22]);
946 }
947
948 {
949 distr[78] = unur_distr_cont_new();
950 unur_distr_set_name( distr[78], "CDF_only" );
951 unur_distr_cont_set_domain( distr[78], 0, UNUR_INFINITY );
952 unur_distr_cont_set_cdf( distr[78], cdf_exp );
953 }
954
955 {
956 distr[79] = unur_distr_cont_new();
957 unur_distr_set_name( distr[79], "CDF&invCDF" );
958 unur_distr_cont_set_domain( distr[79], 0, UNUR_INFINITY );
959 unur_distr_cont_set_cdf( distr[79], cdf_exp );
960 unur_distr_cont_set_invcdf( distr[79], invcdf_exp );
961 }
962
963 /* timing */
964 stopwatch_print(TESTLOG,"\n<*>setup time = %.3f ms\n", stopwatch_lap(&watch));
965
966 printf("\n(chi^2) "); fflush(stdout);
967
968 /* chi^2 tests: 960 */
969
970 unur_set_default_debug(~UNUR_DEBUG_SAMPLE);
971 fprintf( TESTLOG,"\nChi^2 Test:\n");
972
973 /* distribution [0] */
974
975 if(fullcheck) {
976 unur_reset_errno();
977 do {
978 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[0]);
979 par = unur_cstd_new(distr_localcopy);
980 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
981 gen = unur_init(par);
982 rcode = run_validate_chi2(TESTLOG,0,gen,distr[0],'-');
983 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
984 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
985 unur_free(gen);
986 unur_distr_free(distr_localcopy);
987 } while (0);
988 }
989
990 if(fullcheck) {
991 unur_reset_errno();
992 do {
993 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[0]);
994 par = unur_cstd_new(distr_localcopy);
995 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
996 gen = unur_init(par);
997 rcode = run_validate_chi2(TESTLOG,0,gen,distr[0],'+');
998 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
999 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1000 unur_free(gen);
1001 unur_distr_free(distr_localcopy);
1002 } while (0);
1003 }
1004
1005 if(fullcheck) {
1006 printf("."); fflush(stdout);
1007 }
1008
1009 if(fullcheck) {
1010 printf("."); fflush(stdout);
1011 }
1012
1013 if(fullcheck) {
1014 printf("."); fflush(stdout);
1015 }
1016
1017 if(fullcheck) {
1018 printf("."); fflush(stdout);
1019 }
1020
1021 if(fullcheck) {
1022 printf("."); fflush(stdout);
1023 }
1024
1025 if(fullcheck) {
1026 printf("."); fflush(stdout);
1027 }
1028
1029 if(fullcheck) {
1030 printf("."); fflush(stdout);
1031 }
1032
1033 if(fullcheck) {
1034 printf("."); fflush(stdout);
1035 }
1036
1037 if(fullcheck) {
1038 printf("."); fflush(stdout);
1039 }
1040
1041 if(fullcheck) {
1042 printf("."); fflush(stdout);
1043 }
1044
1045 /* distribution [1] */
1046
1047 if(fullcheck) {
1048 printf("."); fflush(stdout);
1049 }
1050
1051 if(fullcheck) {
1052 unur_reset_errno();
1053 do {
1054 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[1]);
1055 par = unur_cstd_new(distr_localcopy);
1056 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1057 gen = unur_init(par);
1058 rcode = run_validate_chi2(TESTLOG,0,gen,distr[1],'+');
1059 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1060 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1061 unur_free(gen);
1062 unur_distr_free(distr_localcopy);
1063 } while (0);
1064 }
1065
1066 if(fullcheck) {
1067 printf("."); fflush(stdout);
1068 }
1069
1070 if(fullcheck) {
1071 printf("."); fflush(stdout);
1072 }
1073
1074 if(fullcheck) {
1075 printf("."); fflush(stdout);
1076 }
1077
1078 if(fullcheck) {
1079 printf("."); fflush(stdout);
1080 }
1081
1082 if(fullcheck) {
1083 printf("."); fflush(stdout);
1084 }
1085
1086 if(fullcheck) {
1087 printf("."); fflush(stdout);
1088 }
1089
1090 if(fullcheck) {
1091 printf("."); fflush(stdout);
1092 }
1093
1094 if(fullcheck) {
1095 printf("."); fflush(stdout);
1096 }
1097
1098 if(fullcheck) {
1099 printf("."); fflush(stdout);
1100 }
1101
1102 if(fullcheck) {
1103 printf("."); fflush(stdout);
1104 }
1105
1106 /* distribution [2] */
1107
1108 if(fullcheck) {
1109 printf("."); fflush(stdout);
1110 }
1111
1112 if(fullcheck) {
1113 unur_reset_errno();
1114 do {
1115 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[2]);
1116 par = unur_cstd_new(distr_localcopy);
1117 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1118 gen = unur_init(par);
1119 rcode = run_validate_chi2(TESTLOG,0,gen,distr[2],'+');
1120 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1121 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1122 unur_free(gen);
1123 unur_distr_free(distr_localcopy);
1124 } while (0);
1125 }
1126
1127 if(fullcheck) {
1128 printf("."); fflush(stdout);
1129 }
1130
1131 if(fullcheck) {
1132 printf("."); fflush(stdout);
1133 }
1134
1135 if(fullcheck) {
1136 printf("."); fflush(stdout);
1137 }
1138
1139 if(fullcheck) {
1140 printf("."); fflush(stdout);
1141 }
1142
1143 if(fullcheck) {
1144 printf("."); fflush(stdout);
1145 }
1146
1147 if(fullcheck) {
1148 printf("."); fflush(stdout);
1149 }
1150
1151 if(fullcheck) {
1152 printf("."); fflush(stdout);
1153 }
1154
1155 if(fullcheck) {
1156 printf("."); fflush(stdout);
1157 }
1158
1159 if(fullcheck) {
1160 printf("."); fflush(stdout);
1161 }
1162
1163 if(fullcheck) {
1164 printf("."); fflush(stdout);
1165 }
1166
1167 /* distribution [3] */
1168
1169 if(TRUE) {
1170 printf("."); fflush(stdout);
1171 }
1172
1173 if(TRUE) {
1174 unur_reset_errno();
1175 do {
1176 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[3]);
1177 par = unur_cstd_new(distr_localcopy);
1178 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1179 gen = unur_init(par);
1180 rcode = run_validate_chi2(TESTLOG,0,gen,distr[3],'+');
1181 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1182 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1183 unur_free(gen);
1184 unur_distr_free(distr_localcopy);
1185 } while (0);
1186 }
1187
1188 if(TRUE) {
1189 printf("."); fflush(stdout);
1190 }
1191
1192 if(TRUE) {
1193 printf("."); fflush(stdout);
1194 }
1195
1196 if(TRUE) {
1197 printf("."); fflush(stdout);
1198 }
1199
1200 if(TRUE) {
1201 printf("."); fflush(stdout);
1202 }
1203
1204 if(TRUE) {
1205 printf("."); fflush(stdout);
1206 }
1207
1208 if(TRUE) {
1209 printf("."); fflush(stdout);
1210 }
1211
1212 if(TRUE) {
1213 printf("."); fflush(stdout);
1214 }
1215
1216 if(TRUE) {
1217 printf("."); fflush(stdout);
1218 }
1219
1220 if(TRUE) {
1221 printf("."); fflush(stdout);
1222 }
1223
1224 if(TRUE) {
1225 printf("."); fflush(stdout);
1226 }
1227
1228 /* distribution [4] */
1229
1230 if(fullcheck) {
1231 printf("."); fflush(stdout);
1232 }
1233
1234 if(fullcheck) {
1235 unur_reset_errno();
1236 do {
1237 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[4]);
1238 par = unur_cstd_new(distr_localcopy);
1239 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1240 gen = unur_init(par);
1241 rcode = run_validate_chi2(TESTLOG,0,gen,distr[4],'+');
1242 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1243 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1244 unur_free(gen);
1245 unur_distr_free(distr_localcopy);
1246 } while (0);
1247 }
1248
1249 if(fullcheck) {
1250 printf("."); fflush(stdout);
1251 }
1252
1253 if(fullcheck) {
1254 printf("."); fflush(stdout);
1255 }
1256
1257 if(fullcheck) {
1258 printf("."); fflush(stdout);
1259 }
1260
1261 if(fullcheck) {
1262 printf("."); fflush(stdout);
1263 }
1264
1265 if(fullcheck) {
1266 printf("."); fflush(stdout);
1267 }
1268
1269 if(fullcheck) {
1270 printf("."); fflush(stdout);
1271 }
1272
1273 if(fullcheck) {
1274 printf("."); fflush(stdout);
1275 }
1276
1277 if(fullcheck) {
1278 printf("."); fflush(stdout);
1279 }
1280
1281 if(fullcheck) {
1282 printf("."); fflush(stdout);
1283 }
1284
1285 if(fullcheck) {
1286 printf("."); fflush(stdout);
1287 }
1288
1289 /* distribution [5] */
1290
1291 if(fullcheck) {
1292 printf("."); fflush(stdout);
1293 }
1294
1295 if(fullcheck) {
1296 unur_reset_errno();
1297 do {
1298 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[5]);
1299 par = unur_cstd_new(distr_localcopy);
1300 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1301 gen = unur_init(par);
1302 rcode = run_validate_chi2(TESTLOG,0,gen,distr[5],'+');
1303 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1304 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1305 unur_free(gen);
1306 unur_distr_free(distr_localcopy);
1307 } while (0);
1308 }
1309
1310 if(fullcheck) {
1311 printf("."); fflush(stdout);
1312 }
1313
1314 if(fullcheck) {
1315 printf("."); fflush(stdout);
1316 }
1317
1318 if(fullcheck) {
1319 printf("."); fflush(stdout);
1320 }
1321
1322 if(fullcheck) {
1323 printf("."); fflush(stdout);
1324 }
1325
1326 if(fullcheck) {
1327 printf("."); fflush(stdout);
1328 }
1329
1330 if(fullcheck) {
1331 printf("."); fflush(stdout);
1332 }
1333
1334 if(fullcheck) {
1335 printf("."); fflush(stdout);
1336 }
1337
1338 if(fullcheck) {
1339 printf("."); fflush(stdout);
1340 }
1341
1342 if(fullcheck) {
1343 printf("."); fflush(stdout);
1344 }
1345
1346 if(fullcheck) {
1347 printf("."); fflush(stdout);
1348 }
1349
1350 /* distribution [6] */
1351
1352 if(fullcheck) {
1353 printf("."); fflush(stdout);
1354 }
1355
1356 if(fullcheck) {
1357 unur_reset_errno();
1358 do {
1359 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[6]);
1360 par = unur_cstd_new(distr_localcopy);
1361 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1362 gen = unur_init(par);
1363 rcode = run_validate_chi2(TESTLOG,0,gen,distr[6],'+');
1364 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1365 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1366 unur_free(gen);
1367 unur_distr_free(distr_localcopy);
1368 } while (0);
1369 }
1370
1371 if(fullcheck) {
1372 printf("."); fflush(stdout);
1373 }
1374
1375 if(fullcheck) {
1376 printf("."); fflush(stdout);
1377 }
1378
1379 if(fullcheck) {
1380 printf("."); fflush(stdout);
1381 }
1382
1383 if(fullcheck) {
1384 printf("."); fflush(stdout);
1385 }
1386
1387 if(fullcheck) {
1388 printf("."); fflush(stdout);
1389 }
1390
1391 if(fullcheck) {
1392 printf("."); fflush(stdout);
1393 }
1394
1395 if(fullcheck) {
1396 printf("."); fflush(stdout);
1397 }
1398
1399 if(fullcheck) {
1400 printf("."); fflush(stdout);
1401 }
1402
1403 if(fullcheck) {
1404 printf("."); fflush(stdout);
1405 }
1406
1407 if(fullcheck) {
1408 printf("."); fflush(stdout);
1409 }
1410
1411 /* distribution [66] */
1412
1413 if(TRUE) {
1414 unur_reset_errno();
1415 do {
1416 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[66]);
1417 par = unur_cstd_new(distr_localcopy);
1418 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1419 gen = unur_init(par);
1420 rcode = run_validate_chi2(TESTLOG,0,gen,distr[66],'+');
1421 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1422 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1423 unur_free(gen);
1424 unur_distr_free(distr_localcopy);
1425 } while (0);
1426 }
1427
1428 if(TRUE) {
1429 printf("."); fflush(stdout);
1430 }
1431
1432 if(TRUE) {
1433 printf("."); fflush(stdout);
1434 }
1435
1436 if(TRUE) {
1437 printf("."); fflush(stdout);
1438 }
1439
1440 if(TRUE) {
1441 printf("."); fflush(stdout);
1442 }
1443
1444 if(TRUE) {
1445 printf("."); fflush(stdout);
1446 }
1447
1448 if(TRUE) {
1449 printf("."); fflush(stdout);
1450 }
1451
1452 if(TRUE) {
1453 printf("."); fflush(stdout);
1454 }
1455
1456 if(TRUE) {
1457 printf("."); fflush(stdout);
1458 }
1459
1460 if(TRUE) {
1461 printf("."); fflush(stdout);
1462 }
1463
1464 if(TRUE) {
1465 printf("."); fflush(stdout);
1466 }
1467
1468 if(TRUE) {
1469 printf("."); fflush(stdout);
1470 }
1471
1472 /* distribution [67] */
1473
1474 if(TRUE) {
1475 unur_reset_errno();
1476 do {
1477 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[67]);
1478 par = unur_cstd_new(distr_localcopy);
1479 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1480 gen = unur_init(par);
1481 rcode = run_validate_chi2(TESTLOG,0,gen,distr[67],'+');
1482 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1483 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1484 unur_free(gen);
1485 unur_distr_free(distr_localcopy);
1486 } while (0);
1487 }
1488
1489 if(TRUE) {
1490 printf("."); fflush(stdout);
1491 }
1492
1493 if(TRUE) {
1494 printf("."); fflush(stdout);
1495 }
1496
1497 if(TRUE) {
1498 printf("."); fflush(stdout);
1499 }
1500
1501 if(TRUE) {
1502 printf("."); fflush(stdout);
1503 }
1504
1505 if(TRUE) {
1506 printf("."); fflush(stdout);
1507 }
1508
1509 if(TRUE) {
1510 printf("."); fflush(stdout);
1511 }
1512
1513 if(TRUE) {
1514 printf("."); fflush(stdout);
1515 }
1516
1517 if(TRUE) {
1518 printf("."); fflush(stdout);
1519 }
1520
1521 if(TRUE) {
1522 printf("."); fflush(stdout);
1523 }
1524
1525 if(TRUE) {
1526 printf("."); fflush(stdout);
1527 }
1528
1529 if(TRUE) {
1530 printf("."); fflush(stdout);
1531 }
1532
1533 /* distribution [68] */
1534
1535 if(TRUE) {
1536 unur_reset_errno();
1537 do {
1538 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[68]);
1539 par = unur_cstd_new(distr_localcopy);
1540 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1541 gen = unur_init(par);
1542 rcode = run_validate_chi2(TESTLOG,0,gen,distr[68],'+');
1543 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1544 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1545 unur_free(gen);
1546 unur_distr_free(distr_localcopy);
1547 } while (0);
1548 }
1549
1550 if(TRUE) {
1551 printf("."); fflush(stdout);
1552 }
1553
1554 if(TRUE) {
1555 printf("."); fflush(stdout);
1556 }
1557
1558 if(TRUE) {
1559 printf("."); fflush(stdout);
1560 }
1561
1562 if(TRUE) {
1563 printf("."); fflush(stdout);
1564 }
1565
1566 if(TRUE) {
1567 printf("."); fflush(stdout);
1568 }
1569
1570 if(TRUE) {
1571 printf("."); fflush(stdout);
1572 }
1573
1574 if(TRUE) {
1575 printf("."); fflush(stdout);
1576 }
1577
1578 if(TRUE) {
1579 printf("."); fflush(stdout);
1580 }
1581
1582 if(TRUE) {
1583 printf("."); fflush(stdout);
1584 }
1585
1586 if(TRUE) {
1587 printf("."); fflush(stdout);
1588 }
1589
1590 if(TRUE) {
1591 printf("."); fflush(stdout);
1592 }
1593
1594 /* distribution [69] */
1595
1596 if(TRUE) {
1597 unur_reset_errno();
1598 do {
1599 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[69]);
1600 par = unur_cstd_new(distr_localcopy);
1601 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1602 gen = unur_init(par);
1603 rcode = run_validate_chi2(TESTLOG,0,gen,distr[69],'+');
1604 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1605 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1606 unur_free(gen);
1607 unur_distr_free(distr_localcopy);
1608 } while (0);
1609 }
1610
1611 if(TRUE) {
1612 printf("."); fflush(stdout);
1613 }
1614
1615 if(TRUE) {
1616 printf("."); fflush(stdout);
1617 }
1618
1619 if(TRUE) {
1620 printf("."); fflush(stdout);
1621 }
1622
1623 if(TRUE) {
1624 printf("."); fflush(stdout);
1625 }
1626
1627 if(TRUE) {
1628 printf("."); fflush(stdout);
1629 }
1630
1631 if(TRUE) {
1632 printf("."); fflush(stdout);
1633 }
1634
1635 if(TRUE) {
1636 printf("."); fflush(stdout);
1637 }
1638
1639 if(TRUE) {
1640 printf("."); fflush(stdout);
1641 }
1642
1643 if(TRUE) {
1644 printf("."); fflush(stdout);
1645 }
1646
1647 if(TRUE) {
1648 printf("."); fflush(stdout);
1649 }
1650
1651 if(TRUE) {
1652 printf("."); fflush(stdout);
1653 }
1654
1655 /* distribution [70] */
1656
1657 if(TRUE) {
1658 unur_reset_errno();
1659 do {
1660 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[70]);
1661 par = unur_cstd_new(distr_localcopy);
1662 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1663 gen = unur_init(par);
1664 rcode = run_validate_chi2(TESTLOG,0,gen,distr[70],'+');
1665 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1666 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1667 unur_free(gen);
1668 unur_distr_free(distr_localcopy);
1669 } while (0);
1670 }
1671
1672 if(TRUE) {
1673 printf("."); fflush(stdout);
1674 }
1675
1676 if(TRUE) {
1677 printf("."); fflush(stdout);
1678 }
1679
1680 if(TRUE) {
1681 printf("."); fflush(stdout);
1682 }
1683
1684 if(TRUE) {
1685 printf("."); fflush(stdout);
1686 }
1687
1688 if(TRUE) {
1689 printf("."); fflush(stdout);
1690 }
1691
1692 if(TRUE) {
1693 printf("."); fflush(stdout);
1694 }
1695
1696 if(TRUE) {
1697 printf("."); fflush(stdout);
1698 }
1699
1700 if(TRUE) {
1701 printf("."); fflush(stdout);
1702 }
1703
1704 if(TRUE) {
1705 printf("."); fflush(stdout);
1706 }
1707
1708 if(TRUE) {
1709 printf("."); fflush(stdout);
1710 }
1711
1712 if(TRUE) {
1713 printf("."); fflush(stdout);
1714 }
1715
1716 /* distribution [71] */
1717
1718 if(TRUE) {
1719 unur_reset_errno();
1720 do {
1721 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[71]);
1722 par = unur_cstd_new(distr_localcopy);
1723 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1724 gen = unur_init(par);
1725 rcode = run_validate_chi2(TESTLOG,0,gen,distr[71],'+');
1726 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1727 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1728 unur_free(gen);
1729 unur_distr_free(distr_localcopy);
1730 } while (0);
1731 }
1732
1733 if(TRUE) {
1734 printf("."); fflush(stdout);
1735 }
1736
1737 if(TRUE) {
1738 printf("."); fflush(stdout);
1739 }
1740
1741 if(TRUE) {
1742 printf("."); fflush(stdout);
1743 }
1744
1745 if(TRUE) {
1746 printf("."); fflush(stdout);
1747 }
1748
1749 if(TRUE) {
1750 printf("."); fflush(stdout);
1751 }
1752
1753 if(TRUE) {
1754 printf("."); fflush(stdout);
1755 }
1756
1757 if(TRUE) {
1758 printf("."); fflush(stdout);
1759 }
1760
1761 if(TRUE) {
1762 printf("."); fflush(stdout);
1763 }
1764
1765 if(TRUE) {
1766 printf("."); fflush(stdout);
1767 }
1768
1769 if(TRUE) {
1770 printf("."); fflush(stdout);
1771 }
1772
1773 if(TRUE) {
1774 printf("."); fflush(stdout);
1775 }
1776
1777 /* distribution [72] */
1778
1779 if(TRUE) {
1780 unur_reset_errno();
1781 do {
1782 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[72]);
1783 par = unur_cstd_new(distr_localcopy);
1784 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1785 gen = unur_init(par);
1786 rcode = run_validate_chi2(TESTLOG,0,gen,distr[72],'+');
1787 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1788 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1789 unur_free(gen);
1790 unur_distr_free(distr_localcopy);
1791 } while (0);
1792 }
1793
1794 if(TRUE) {
1795 printf("."); fflush(stdout);
1796 }
1797
1798 if(TRUE) {
1799 printf("."); fflush(stdout);
1800 }
1801
1802 if(TRUE) {
1803 printf("."); fflush(stdout);
1804 }
1805
1806 if(TRUE) {
1807 printf("."); fflush(stdout);
1808 }
1809
1810 if(TRUE) {
1811 printf("."); fflush(stdout);
1812 }
1813
1814 if(TRUE) {
1815 printf("."); fflush(stdout);
1816 }
1817
1818 if(TRUE) {
1819 printf("."); fflush(stdout);
1820 }
1821
1822 if(TRUE) {
1823 printf("."); fflush(stdout);
1824 }
1825
1826 if(TRUE) {
1827 printf("."); fflush(stdout);
1828 }
1829
1830 if(TRUE) {
1831 printf("."); fflush(stdout);
1832 }
1833
1834 if(TRUE) {
1835 printf("."); fflush(stdout);
1836 }
1837
1838 /* distribution [73] */
1839
1840 if(TRUE) {
1841 unur_reset_errno();
1842 do {
1843 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[73]);
1844 par = unur_cstd_new(distr_localcopy);
1845 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1846 gen = unur_init(par);
1847 rcode = run_validate_chi2(TESTLOG,0,gen,distr[73],'+');
1848 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1849 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1850 unur_free(gen);
1851 unur_distr_free(distr_localcopy);
1852 } while (0);
1853 }
1854
1855 if(TRUE) {
1856 printf("."); fflush(stdout);
1857 }
1858
1859 if(TRUE) {
1860 printf("."); fflush(stdout);
1861 }
1862
1863 if(TRUE) {
1864 printf("."); fflush(stdout);
1865 }
1866
1867 if(TRUE) {
1868 printf("."); fflush(stdout);
1869 }
1870
1871 if(TRUE) {
1872 printf("."); fflush(stdout);
1873 }
1874
1875 if(TRUE) {
1876 printf("."); fflush(stdout);
1877 }
1878
1879 if(TRUE) {
1880 printf("."); fflush(stdout);
1881 }
1882
1883 if(TRUE) {
1884 printf("."); fflush(stdout);
1885 }
1886
1887 if(TRUE) {
1888 printf("."); fflush(stdout);
1889 }
1890
1891 if(TRUE) {
1892 printf("."); fflush(stdout);
1893 }
1894
1895 if(TRUE) {
1896 printf("."); fflush(stdout);
1897 }
1898
1899 /* distribution [74] */
1900
1901 if(TRUE) {
1902 unur_reset_errno();
1903 do {
1904 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[74]);
1905 par = unur_cstd_new(distr_localcopy);
1906 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1907 gen = unur_init(par);
1908 rcode = run_validate_chi2(TESTLOG,0,gen,distr[74],'+');
1909 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1910 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1911 unur_free(gen);
1912 unur_distr_free(distr_localcopy);
1913 } while (0);
1914 }
1915
1916 if(TRUE) {
1917 printf("."); fflush(stdout);
1918 }
1919
1920 if(TRUE) {
1921 printf("."); fflush(stdout);
1922 }
1923
1924 if(TRUE) {
1925 printf("."); fflush(stdout);
1926 }
1927
1928 if(TRUE) {
1929 printf("."); fflush(stdout);
1930 }
1931
1932 if(TRUE) {
1933 printf("."); fflush(stdout);
1934 }
1935
1936 if(TRUE) {
1937 printf("."); fflush(stdout);
1938 }
1939
1940 if(TRUE) {
1941 printf("."); fflush(stdout);
1942 }
1943
1944 if(TRUE) {
1945 printf("."); fflush(stdout);
1946 }
1947
1948 if(TRUE) {
1949 printf("."); fflush(stdout);
1950 }
1951
1952 if(TRUE) {
1953 printf("."); fflush(stdout);
1954 }
1955
1956 if(TRUE) {
1957 printf("."); fflush(stdout);
1958 }
1959
1960 /* distribution [75] */
1961
1962 if(TRUE) {
1963 unur_reset_errno();
1964 do {
1965 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[75]);
1966 par = unur_cstd_new(distr_localcopy);
1967 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
1968 gen = unur_init(par);
1969 rcode = run_validate_chi2(TESTLOG,0,gen,distr[75],'+');
1970 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
1971 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
1972 unur_free(gen);
1973 unur_distr_free(distr_localcopy);
1974 } while (0);
1975 }
1976
1977 if(TRUE) {
1978 printf("."); fflush(stdout);
1979 }
1980
1981 if(TRUE) {
1982 printf("."); fflush(stdout);
1983 }
1984
1985 if(TRUE) {
1986 printf("."); fflush(stdout);
1987 }
1988
1989 if(TRUE) {
1990 printf("."); fflush(stdout);
1991 }
1992
1993 if(TRUE) {
1994 printf("."); fflush(stdout);
1995 }
1996
1997 if(TRUE) {
1998 printf("."); fflush(stdout);
1999 }
2000
2001 if(TRUE) {
2002 printf("."); fflush(stdout);
2003 }
2004
2005 if(TRUE) {
2006 printf("."); fflush(stdout);
2007 }
2008
2009 if(TRUE) {
2010 printf("."); fflush(stdout);
2011 }
2012
2013 if(TRUE) {
2014 printf("."); fflush(stdout);
2015 }
2016
2017 if(TRUE) {
2018 printf("."); fflush(stdout);
2019 }
2020
2021 /* distribution [76] */
2022
2023 if(TRUE) {
2024 unur_reset_errno();
2025 do {
2026 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[76]);
2027 par = unur_cstd_new(distr_localcopy);
2028 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2029 gen = unur_init(par);
2030 rcode = run_validate_chi2(TESTLOG,0,gen,distr[76],'0');
2031 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2032 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2033 unur_free(gen);
2034 unur_distr_free(distr_localcopy);
2035 } while (0);
2036 }
2037
2038 if(TRUE) {
2039 printf("."); fflush(stdout);
2040 }
2041
2042 if(TRUE) {
2043 printf("."); fflush(stdout);
2044 }
2045
2046 if(TRUE) {
2047 printf("."); fflush(stdout);
2048 }
2049
2050 if(TRUE) {
2051 printf("."); fflush(stdout);
2052 }
2053
2054 if(TRUE) {
2055 printf("."); fflush(stdout);
2056 }
2057
2058 if(TRUE) {
2059 printf("."); fflush(stdout);
2060 }
2061
2062 if(TRUE) {
2063 printf("."); fflush(stdout);
2064 }
2065
2066 if(TRUE) {
2067 printf("."); fflush(stdout);
2068 }
2069
2070 if(TRUE) {
2071 printf("."); fflush(stdout);
2072 }
2073
2074 if(TRUE) {
2075 printf("."); fflush(stdout);
2076 }
2077
2078 if(TRUE) {
2079 printf("."); fflush(stdout);
2080 }
2081
2082 /* distribution [77] */
2083
2084 if(TRUE) {
2085 unur_reset_errno();
2086 do {
2087 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[77]);
2088 par = unur_cstd_new(distr_localcopy);
2089 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2090 gen = unur_init(par);
2091 rcode = run_validate_chi2(TESTLOG,0,gen,distr[77],'+');
2092 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2093 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2094 unur_free(gen);
2095 unur_distr_free(distr_localcopy);
2096 } while (0);
2097 }
2098
2099 if(TRUE) {
2100 printf("."); fflush(stdout);
2101 }
2102
2103 if(TRUE) {
2104 printf("."); fflush(stdout);
2105 }
2106
2107 if(TRUE) {
2108 printf("."); fflush(stdout);
2109 }
2110
2111 if(TRUE) {
2112 printf("."); fflush(stdout);
2113 }
2114
2115 if(TRUE) {
2116 printf("."); fflush(stdout);
2117 }
2118
2119 if(TRUE) {
2120 printf("."); fflush(stdout);
2121 }
2122
2123 if(TRUE) {
2124 printf("."); fflush(stdout);
2125 }
2126
2127 if(TRUE) {
2128 printf("."); fflush(stdout);
2129 }
2130
2131 if(TRUE) {
2132 printf("."); fflush(stdout);
2133 }
2134
2135 if(TRUE) {
2136 printf("."); fflush(stdout);
2137 }
2138
2139 if(TRUE) {
2140 printf("."); fflush(stdout);
2141 }
2142
2143 /* distribution [7] */
2144
2145 if(TRUE) {
2146 unur_reset_errno();
2147 do {
2148 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[7]);
2149 par = unur_cstd_new(distr_localcopy);
2150 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2151 gen = unur_init(par);
2152 rcode = run_validate_chi2(TESTLOG,0,gen,distr[7],'+');
2153 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2154 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2155 unur_free(gen);
2156 unur_distr_free(distr_localcopy);
2157 } while (0);
2158 }
2159
2160 if(TRUE) {
2161 printf("."); fflush(stdout);
2162 }
2163
2164 if(TRUE) {
2165 printf("."); fflush(stdout);
2166 }
2167
2168 if(TRUE) {
2169 printf("."); fflush(stdout);
2170 }
2171
2172 if(TRUE) {
2173 printf("."); fflush(stdout);
2174 }
2175
2176 if(TRUE) {
2177 printf("."); fflush(stdout);
2178 }
2179
2180 if(TRUE) {
2181 printf("."); fflush(stdout);
2182 }
2183
2184 if(TRUE) {
2185 printf("."); fflush(stdout);
2186 }
2187
2188 if(TRUE) {
2189 printf("."); fflush(stdout);
2190 }
2191
2192 if(TRUE) {
2193 printf("."); fflush(stdout);
2194 }
2195
2196 if(TRUE) {
2197 unur_reset_errno();
2198 do {
2199 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[7]);
2200 par = unur_cstd_new(distr_localcopy);
2201 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2202 gen = unur_init(par);
2203 if (gen) {
2204 unur_cstd_chg_truncated(gen,0.5,0.55);
2205 }
2206 rcode = run_validate_chi2(TESTLOG,0,gen,distr[7],'+');
2207 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2208 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2209 unur_free(gen);
2210 unur_distr_free(distr_localcopy);
2211 } while (0);
2212 }
2213
2214 if(TRUE) {
2215 unur_reset_errno();
2216 do {
2217 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[7]);
2218 { UNUR_DISTR *dg =NULL;
2219 par = unur_cstd_new(distr_localcopy);
2220 fpm[0] = 2.;
2221 fpm[1] = 5.;
2222 gen = unur_init(par);
2223 if (gen) {
2224 dg = unur_get_distr(gen);
2225 unur_distr_cont_set_pdfparams(dg,fpm,2);
2226 unur_reinit(gen); }
2227 }
2228 rcode = run_validate_chi2(TESTLOG,0,gen,distr[7],'+');
2229 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2230 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2231 unur_free(gen);
2232 unur_distr_free(distr_localcopy);
2233 } while (0);
2234 }
2235
2236 /* distribution [8] */
2237
2238 if(TRUE) {
2239 unur_reset_errno();
2240 do {
2241 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[8]);
2242 par = unur_cstd_new(distr_localcopy);
2243 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2244 gen = unur_init(par);
2245 rcode = run_validate_chi2(TESTLOG,0,gen,distr[8],'+');
2246 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2247 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2248 unur_free(gen);
2249 unur_distr_free(distr_localcopy);
2250 } while (0);
2251 }
2252
2253 if(TRUE) {
2254 printf("."); fflush(stdout);
2255 }
2256
2257 if(TRUE) {
2258 printf("."); fflush(stdout);
2259 }
2260
2261 if(TRUE) {
2262 printf("."); fflush(stdout);
2263 }
2264
2265 if(TRUE) {
2266 printf("."); fflush(stdout);
2267 }
2268
2269 if(TRUE) {
2270 printf("."); fflush(stdout);
2271 }
2272
2273 if(TRUE) {
2274 printf("."); fflush(stdout);
2275 }
2276
2277 if(TRUE) {
2278 printf("."); fflush(stdout);
2279 }
2280
2281 if(TRUE) {
2282 printf("."); fflush(stdout);
2283 }
2284
2285 if(TRUE) {
2286 printf("."); fflush(stdout);
2287 }
2288
2289 if(TRUE) {
2290 unur_reset_errno();
2291 do {
2292 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[8]);
2293 par = unur_cstd_new(distr_localcopy);
2294 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2295 gen = unur_init(par);
2296 if (gen) {
2297 unur_cstd_chg_truncated(gen,0.5,0.55);
2298 }
2299 rcode = run_validate_chi2(TESTLOG,0,gen,distr[8],'+');
2300 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2301 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2302 unur_free(gen);
2303 unur_distr_free(distr_localcopy);
2304 } while (0);
2305 }
2306
2307 if(TRUE) {
2308 unur_reset_errno();
2309 do {
2310 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[8]);
2311 { UNUR_DISTR *dg =NULL;
2312 par = unur_cstd_new(distr_localcopy);
2313 fpm[0] = 2.;
2314 fpm[1] = 5.;
2315 gen = unur_init(par);
2316 if (gen) {
2317 dg = unur_get_distr(gen);
2318 unur_distr_cont_set_pdfparams(dg,fpm,2);
2319 unur_reinit(gen); }
2320 }
2321 rcode = run_validate_chi2(TESTLOG,0,gen,distr[8],'+');
2322 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2323 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2324 unur_free(gen);
2325 unur_distr_free(distr_localcopy);
2326 } while (0);
2327 }
2328
2329 /* distribution [23] */
2330
2331 if(fullcheck) {
2332 printf("."); fflush(stdout);
2333 }
2334
2335 if(fullcheck) {
2336 unur_reset_errno();
2337 do {
2338 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[23]);
2339 par = unur_cstd_new(distr_localcopy);
2340 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2341 gen = unur_init(par);
2342 rcode = run_validate_chi2(TESTLOG,0,gen,distr[23],'-');
2343 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2344 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2345 unur_free(gen);
2346 unur_distr_free(distr_localcopy);
2347 } while (0);
2348 }
2349
2350 if(fullcheck) {
2351 printf("."); fflush(stdout);
2352 }
2353
2354 if(fullcheck) {
2355 printf("."); fflush(stdout);
2356 }
2357
2358 if(fullcheck) {
2359 printf("."); fflush(stdout);
2360 }
2361
2362 if(fullcheck) {
2363 printf("."); fflush(stdout);
2364 }
2365
2366 if(fullcheck) {
2367 printf("."); fflush(stdout);
2368 }
2369
2370 if(fullcheck) {
2371 printf("."); fflush(stdout);
2372 }
2373
2374 if(fullcheck) {
2375 printf("."); fflush(stdout);
2376 }
2377
2378 if(fullcheck) {
2379 printf("."); fflush(stdout);
2380 }
2381
2382 if(fullcheck) {
2383 printf("."); fflush(stdout);
2384 }
2385
2386 if(fullcheck) {
2387 printf("."); fflush(stdout);
2388 }
2389
2390 /* distribution [24] */
2391
2392 if(fullcheck) {
2393 printf("."); fflush(stdout);
2394 }
2395
2396 if(fullcheck) {
2397 unur_reset_errno();
2398 do {
2399 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[24]);
2400 par = unur_cstd_new(distr_localcopy);
2401 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2402 gen = unur_init(par);
2403 rcode = run_validate_chi2(TESTLOG,0,gen,distr[24],'+');
2404 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2405 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2406 unur_free(gen);
2407 unur_distr_free(distr_localcopy);
2408 } while (0);
2409 }
2410
2411 if(fullcheck) {
2412 printf("."); fflush(stdout);
2413 }
2414
2415 if(fullcheck) {
2416 printf("."); fflush(stdout);
2417 }
2418
2419 if(fullcheck) {
2420 printf("."); fflush(stdout);
2421 }
2422
2423 if(fullcheck) {
2424 printf("."); fflush(stdout);
2425 }
2426
2427 if(fullcheck) {
2428 printf("."); fflush(stdout);
2429 }
2430
2431 if(fullcheck) {
2432 printf("."); fflush(stdout);
2433 }
2434
2435 if(fullcheck) {
2436 printf("."); fflush(stdout);
2437 }
2438
2439 if(fullcheck) {
2440 printf("."); fflush(stdout);
2441 }
2442
2443 if(fullcheck) {
2444 printf("."); fflush(stdout);
2445 }
2446
2447 if(fullcheck) {
2448 unur_reset_errno();
2449 do {
2450 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[24]);
2451 { UNUR_DISTR *dg =NULL;
2452 par = unur_cstd_new(distr_localcopy);
2453 fpm[0] = 2.;
2454 fpm[1] = 5.;
2455 gen = unur_init(par);
2456 if (gen) {
2457 dg = unur_get_distr(gen);
2458 unur_distr_cont_set_pdfparams(dg,fpm,2);
2459 unur_reinit(gen); }
2460 }
2461 rcode = run_validate_chi2(TESTLOG,0,gen,distr[24],'+');
2462 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2463 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2464 unur_free(gen);
2465 unur_distr_free(distr_localcopy);
2466 } while (0);
2467 }
2468
2469 /* distribution [25] */
2470
2471 if(TRUE) {
2472 printf("."); fflush(stdout);
2473 }
2474
2475 if(TRUE) {
2476 unur_reset_errno();
2477 do {
2478 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[25]);
2479 par = unur_cstd_new(distr_localcopy);
2480 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2481 gen = unur_init(par);
2482 rcode = run_validate_chi2(TESTLOG,0,gen,distr[25],'+');
2483 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2484 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2485 unur_free(gen);
2486 unur_distr_free(distr_localcopy);
2487 } while (0);
2488 }
2489
2490 if(TRUE) {
2491 printf("."); fflush(stdout);
2492 }
2493
2494 if(TRUE) {
2495 printf("."); fflush(stdout);
2496 }
2497
2498 if(TRUE) {
2499 printf("."); fflush(stdout);
2500 }
2501
2502 if(TRUE) {
2503 printf("."); fflush(stdout);
2504 }
2505
2506 if(TRUE) {
2507 printf("."); fflush(stdout);
2508 }
2509
2510 if(TRUE) {
2511 printf("."); fflush(stdout);
2512 }
2513
2514 if(TRUE) {
2515 printf("."); fflush(stdout);
2516 }
2517
2518 if(TRUE) {
2519 printf("."); fflush(stdout);
2520 }
2521
2522 if(TRUE) {
2523 printf("."); fflush(stdout);
2524 }
2525
2526 if(TRUE) {
2527 printf("."); fflush(stdout);
2528 }
2529
2530 /* distribution [26] */
2531
2532 if(fullcheck) {
2533 printf("."); fflush(stdout);
2534 }
2535
2536 if(fullcheck) {
2537 unur_reset_errno();
2538 do {
2539 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[26]);
2540 par = unur_cstd_new(distr_localcopy);
2541 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2542 gen = unur_init(par);
2543 rcode = run_validate_chi2(TESTLOG,0,gen,distr[26],'+');
2544 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2545 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2546 unur_free(gen);
2547 unur_distr_free(distr_localcopy);
2548 } while (0);
2549 }
2550
2551 if(fullcheck) {
2552 printf("."); fflush(stdout);
2553 }
2554
2555 if(fullcheck) {
2556 printf("."); fflush(stdout);
2557 }
2558
2559 if(fullcheck) {
2560 printf("."); fflush(stdout);
2561 }
2562
2563 if(fullcheck) {
2564 printf("."); fflush(stdout);
2565 }
2566
2567 if(fullcheck) {
2568 printf("."); fflush(stdout);
2569 }
2570
2571 if(fullcheck) {
2572 printf("."); fflush(stdout);
2573 }
2574
2575 if(fullcheck) {
2576 printf("."); fflush(stdout);
2577 }
2578
2579 if(fullcheck) {
2580 printf("."); fflush(stdout);
2581 }
2582
2583 if(fullcheck) {
2584 printf("."); fflush(stdout);
2585 }
2586
2587 if(fullcheck) {
2588 unur_reset_errno();
2589 do {
2590 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[26]);
2591 { UNUR_DISTR *dg =NULL;
2592 par = unur_cstd_new(distr_localcopy);
2593 fpm[0] = 2.;
2594 fpm[1] = 5.;
2595 gen = unur_init(par);
2596 if (gen) {
2597 dg = unur_get_distr(gen);
2598 unur_distr_cont_set_pdfparams(dg,fpm,2);
2599 unur_reinit(gen); }
2600 }
2601 rcode = run_validate_chi2(TESTLOG,0,gen,distr[26],'+');
2602 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2603 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2604 unur_free(gen);
2605 unur_distr_free(distr_localcopy);
2606 } while (0);
2607 }
2608
2609 /* distribution [27] */
2610
2611 if(TRUE) {
2612 unur_reset_errno();
2613 do {
2614 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[27]);
2615 par = unur_cstd_new(distr_localcopy);
2616 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2617 gen = unur_init(par);
2618 rcode = run_validate_chi2(TESTLOG,0,gen,distr[27],'+');
2619 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2620 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2621 unur_free(gen);
2622 unur_distr_free(distr_localcopy);
2623 } while (0);
2624 }
2625
2626 if(TRUE) {
2627 printf("."); fflush(stdout);
2628 }
2629
2630 if(TRUE) {
2631 printf("."); fflush(stdout);
2632 }
2633
2634 if(TRUE) {
2635 printf("."); fflush(stdout);
2636 }
2637
2638 if(TRUE) {
2639 printf("."); fflush(stdout);
2640 }
2641
2642 if(TRUE) {
2643 printf("."); fflush(stdout);
2644 }
2645
2646 if(TRUE) {
2647 printf("."); fflush(stdout);
2648 }
2649
2650 if(TRUE) {
2651 printf("."); fflush(stdout);
2652 }
2653
2654 if(TRUE) {
2655 printf("."); fflush(stdout);
2656 }
2657
2658 if(TRUE) {
2659 printf("."); fflush(stdout);
2660 }
2661
2662 if(TRUE) {
2663 unur_reset_errno();
2664 do {
2665 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[27]);
2666 par = unur_cstd_new(distr_localcopy);
2667 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2668 gen = unur_init(par);
2669 if (gen) {
2670 unur_cstd_chg_truncated(gen,0.5,0.55);
2671 }
2672 rcode = run_validate_chi2(TESTLOG,0,gen,distr[27],'+');
2673 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2674 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2675 unur_free(gen);
2676 unur_distr_free(distr_localcopy);
2677 } while (0);
2678 }
2679
2680 if(TRUE) {
2681 unur_reset_errno();
2682 do {
2683 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[27]);
2684 { UNUR_DISTR *dg =NULL;
2685 par = unur_cstd_new(distr_localcopy);
2686 fpm[0] = 2.;
2687 fpm[1] = 5.;
2688 gen = unur_init(par);
2689 if (gen) {
2690 dg = unur_get_distr(gen);
2691 unur_distr_cont_set_pdfparams(dg,fpm,2);
2692 unur_reinit(gen); }
2693 }
2694 rcode = run_validate_chi2(TESTLOG,0,gen,distr[27],'+');
2695 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2696 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2697 unur_free(gen);
2698 unur_distr_free(distr_localcopy);
2699 } while (0);
2700 }
2701
2702 /* distribution [28] */
2703
2704 if(fullcheck) {
2705 unur_reset_errno();
2706 do {
2707 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[28]);
2708 par = unur_cstd_new(distr_localcopy);
2709 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2710 gen = unur_init(par);
2711 rcode = run_validate_chi2(TESTLOG,0,gen,distr[28],'+');
2712 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2713 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2714 unur_free(gen);
2715 unur_distr_free(distr_localcopy);
2716 } while (0);
2717 }
2718
2719 if(fullcheck) {
2720 printf("."); fflush(stdout);
2721 }
2722
2723 if(fullcheck) {
2724 printf("."); fflush(stdout);
2725 }
2726
2727 if(fullcheck) {
2728 printf("."); fflush(stdout);
2729 }
2730
2731 if(fullcheck) {
2732 printf("."); fflush(stdout);
2733 }
2734
2735 if(fullcheck) {
2736 printf("."); fflush(stdout);
2737 }
2738
2739 if(fullcheck) {
2740 printf("."); fflush(stdout);
2741 }
2742
2743 if(fullcheck) {
2744 printf("."); fflush(stdout);
2745 }
2746
2747 if(fullcheck) {
2748 printf("."); fflush(stdout);
2749 }
2750
2751 if(fullcheck) {
2752 printf("."); fflush(stdout);
2753 }
2754
2755 if(fullcheck) {
2756 unur_reset_errno();
2757 do {
2758 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[28]);
2759 par = unur_cstd_new(distr_localcopy);
2760 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2761 gen = unur_init(par);
2762 if (gen) {
2763 unur_cstd_chg_truncated(gen,0.5,0.55);
2764 }
2765 rcode = run_validate_chi2(TESTLOG,0,gen,distr[28],'+');
2766 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2767 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2768 unur_free(gen);
2769 unur_distr_free(distr_localcopy);
2770 } while (0);
2771 }
2772
2773 if(fullcheck) {
2774 unur_reset_errno();
2775 do {
2776 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[28]);
2777 { UNUR_DISTR *dg =NULL;
2778 par = unur_cstd_new(distr_localcopy);
2779 fpm[0] = 2.;
2780 fpm[1] = 5.;
2781 gen = unur_init(par);
2782 if (gen) {
2783 dg = unur_get_distr(gen);
2784 unur_distr_cont_set_pdfparams(dg,fpm,2);
2785 unur_reinit(gen); }
2786 }
2787 rcode = run_validate_chi2(TESTLOG,0,gen,distr[28],'+');
2788 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2789 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2790 unur_free(gen);
2791 unur_distr_free(distr_localcopy);
2792 } while (0);
2793 }
2794
2795 /* distribution [29] */
2796
2797 if(TRUE) {
2798 unur_reset_errno();
2799 do {
2800 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[29]);
2801 par = unur_cstd_new(distr_localcopy);
2802 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2803 gen = unur_init(par);
2804 rcode = run_validate_chi2(TESTLOG,0,gen,distr[29],'+');
2805 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2806 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2807 unur_free(gen);
2808 unur_distr_free(distr_localcopy);
2809 } while (0);
2810 }
2811
2812 if(TRUE) {
2813 printf("."); fflush(stdout);
2814 }
2815
2816 if(TRUE) {
2817 printf("."); fflush(stdout);
2818 }
2819
2820 if(TRUE) {
2821 printf("."); fflush(stdout);
2822 }
2823
2824 if(TRUE) {
2825 printf("."); fflush(stdout);
2826 }
2827
2828 if(TRUE) {
2829 printf("."); fflush(stdout);
2830 }
2831
2832 if(TRUE) {
2833 printf("."); fflush(stdout);
2834 }
2835
2836 if(TRUE) {
2837 printf("."); fflush(stdout);
2838 }
2839
2840 if(TRUE) {
2841 printf("."); fflush(stdout);
2842 }
2843
2844 if(TRUE) {
2845 printf("."); fflush(stdout);
2846 }
2847
2848 if(TRUE) {
2849 unur_reset_errno();
2850 do {
2851 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[29]);
2852 par = unur_cstd_new(distr_localcopy);
2853 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2854 gen = unur_init(par);
2855 if (gen) {
2856 unur_cstd_chg_truncated(gen,0.5,0.55);
2857 }
2858 rcode = run_validate_chi2(TESTLOG,0,gen,distr[29],'+');
2859 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2860 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2861 unur_free(gen);
2862 unur_distr_free(distr_localcopy);
2863 } while (0);
2864 }
2865
2866 if(TRUE) {
2867 unur_reset_errno();
2868 do {
2869 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[29]);
2870 { UNUR_DISTR *dg =NULL;
2871 par = unur_cstd_new(distr_localcopy);
2872 fpm[0] = 2.;
2873 fpm[1] = 5.;
2874 gen = unur_init(par);
2875 if (gen) {
2876 dg = unur_get_distr(gen);
2877 unur_distr_cont_set_pdfparams(dg,fpm,2);
2878 unur_reinit(gen); }
2879 }
2880 rcode = run_validate_chi2(TESTLOG,0,gen,distr[29],'+');
2881 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2882 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2883 unur_free(gen);
2884 unur_distr_free(distr_localcopy);
2885 } while (0);
2886 }
2887
2888 /* distribution [30] */
2889
2890 if(TRUE) {
2891 unur_reset_errno();
2892 do {
2893 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[30]);
2894 par = unur_cstd_new(distr_localcopy);
2895 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2896 gen = unur_init(par);
2897 rcode = run_validate_chi2(TESTLOG,0,gen,distr[30],'+');
2898 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2899 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2900 unur_free(gen);
2901 unur_distr_free(distr_localcopy);
2902 } while (0);
2903 }
2904
2905 if(TRUE) {
2906 printf("."); fflush(stdout);
2907 }
2908
2909 if(TRUE) {
2910 printf("."); fflush(stdout);
2911 }
2912
2913 if(TRUE) {
2914 printf("."); fflush(stdout);
2915 }
2916
2917 if(TRUE) {
2918 printf("."); fflush(stdout);
2919 }
2920
2921 if(TRUE) {
2922 printf("."); fflush(stdout);
2923 }
2924
2925 if(TRUE) {
2926 printf("."); fflush(stdout);
2927 }
2928
2929 if(TRUE) {
2930 printf("."); fflush(stdout);
2931 }
2932
2933 if(TRUE) {
2934 printf("."); fflush(stdout);
2935 }
2936
2937 if(TRUE) {
2938 printf("."); fflush(stdout);
2939 }
2940
2941 if(TRUE) {
2942 unur_reset_errno();
2943 do {
2944 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[30]);
2945 par = unur_cstd_new(distr_localcopy);
2946 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2947 gen = unur_init(par);
2948 if (gen) {
2949 unur_cstd_chg_truncated(gen,0.5,0.55);
2950 }
2951 rcode = run_validate_chi2(TESTLOG,0,gen,distr[30],'+');
2952 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2953 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2954 unur_free(gen);
2955 unur_distr_free(distr_localcopy);
2956 } while (0);
2957 }
2958
2959 if(TRUE) {
2960 unur_reset_errno();
2961 do {
2962 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[30]);
2963 { UNUR_DISTR *dg =NULL;
2964 par = unur_cstd_new(distr_localcopy);
2965 fpm[0] = 2.;
2966 fpm[1] = 5.;
2967 gen = unur_init(par);
2968 if (gen) {
2969 dg = unur_get_distr(gen);
2970 unur_distr_cont_set_pdfparams(dg,fpm,2);
2971 unur_reinit(gen); }
2972 }
2973 rcode = run_validate_chi2(TESTLOG,0,gen,distr[30],'+');
2974 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2975 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2976 unur_free(gen);
2977 unur_distr_free(distr_localcopy);
2978 } while (0);
2979 }
2980
2981 /* distribution [31] */
2982
2983 if(TRUE) {
2984 unur_reset_errno();
2985 do {
2986 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[31]);
2987 par = unur_cstd_new(distr_localcopy);
2988 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
2989 gen = unur_init(par);
2990 rcode = run_validate_chi2(TESTLOG,0,gen,distr[31],'+');
2991 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
2992 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
2993 unur_free(gen);
2994 unur_distr_free(distr_localcopy);
2995 } while (0);
2996 }
2997
2998 if(TRUE) {
2999 printf("."); fflush(stdout);
3000 }
3001
3002 if(TRUE) {
3003 printf("."); fflush(stdout);
3004 }
3005
3006 if(TRUE) {
3007 printf("."); fflush(stdout);
3008 }
3009
3010 if(TRUE) {
3011 printf("."); fflush(stdout);
3012 }
3013
3014 if(TRUE) {
3015 printf("."); fflush(stdout);
3016 }
3017
3018 if(TRUE) {
3019 printf("."); fflush(stdout);
3020 }
3021
3022 if(TRUE) {
3023 printf("."); fflush(stdout);
3024 }
3025
3026 if(TRUE) {
3027 printf("."); fflush(stdout);
3028 }
3029
3030 if(TRUE) {
3031 printf("."); fflush(stdout);
3032 }
3033
3034 if(TRUE) {
3035 unur_reset_errno();
3036 do {
3037 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[31]);
3038 par = unur_cstd_new(distr_localcopy);
3039 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3040 gen = unur_init(par);
3041 if (gen) {
3042 unur_cstd_chg_truncated(gen,0.5,0.55);
3043 }
3044 rcode = run_validate_chi2(TESTLOG,0,gen,distr[31],'+');
3045 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3046 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3047 unur_free(gen);
3048 unur_distr_free(distr_localcopy);
3049 } while (0);
3050 }
3051
3052 if(TRUE) {
3053 unur_reset_errno();
3054 do {
3055 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[31]);
3056 { UNUR_DISTR *dg =NULL;
3057 par = unur_cstd_new(distr_localcopy);
3058 fpm[0] = 2.;
3059 fpm[1] = 5.;
3060 gen = unur_init(par);
3061 if (gen) {
3062 dg = unur_get_distr(gen);
3063 unur_distr_cont_set_pdfparams(dg,fpm,2);
3064 unur_reinit(gen); }
3065 }
3066 rcode = run_validate_chi2(TESTLOG,0,gen,distr[31],'+');
3067 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3068 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3069 unur_free(gen);
3070 unur_distr_free(distr_localcopy);
3071 } while (0);
3072 }
3073
3074 /* distribution [32] */
3075
3076 if(TRUE) {
3077 unur_reset_errno();
3078 do {
3079 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[32]);
3080 par = unur_cstd_new(distr_localcopy);
3081 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3082 gen = unur_init(par);
3083 rcode = run_validate_chi2(TESTLOG,0,gen,distr[32],'+');
3084 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3085 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3086 unur_free(gen);
3087 unur_distr_free(distr_localcopy);
3088 } while (0);
3089 }
3090
3091 if(TRUE) {
3092 printf("."); fflush(stdout);
3093 }
3094
3095 if(TRUE) {
3096 printf("."); fflush(stdout);
3097 }
3098
3099 if(TRUE) {
3100 printf("."); fflush(stdout);
3101 }
3102
3103 if(TRUE) {
3104 printf("."); fflush(stdout);
3105 }
3106
3107 if(TRUE) {
3108 printf("."); fflush(stdout);
3109 }
3110
3111 if(TRUE) {
3112 printf("."); fflush(stdout);
3113 }
3114
3115 if(TRUE) {
3116 printf("."); fflush(stdout);
3117 }
3118
3119 if(TRUE) {
3120 printf("."); fflush(stdout);
3121 }
3122
3123 if(TRUE) {
3124 printf("."); fflush(stdout);
3125 }
3126
3127 if(TRUE) {
3128 unur_reset_errno();
3129 do {
3130 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[32]);
3131 par = unur_cstd_new(distr_localcopy);
3132 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3133 gen = unur_init(par);
3134 if (gen) {
3135 unur_cstd_chg_truncated(gen,0.5,0.55);
3136 }
3137 rcode = run_validate_chi2(TESTLOG,0,gen,distr[32],'+');
3138 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3139 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3140 unur_free(gen);
3141 unur_distr_free(distr_localcopy);
3142 } while (0);
3143 }
3144
3145 if(TRUE) {
3146 unur_reset_errno();
3147 do {
3148 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[32]);
3149 { UNUR_DISTR *dg =NULL;
3150 par = unur_cstd_new(distr_localcopy);
3151 fpm[0] = 2.;
3152 fpm[1] = 5.;
3153 gen = unur_init(par);
3154 if (gen) {
3155 dg = unur_get_distr(gen);
3156 unur_distr_cont_set_pdfparams(dg,fpm,2);
3157 unur_reinit(gen); }
3158 }
3159 rcode = run_validate_chi2(TESTLOG,0,gen,distr[32],'+');
3160 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3161 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3162 unur_free(gen);
3163 unur_distr_free(distr_localcopy);
3164 } while (0);
3165 }
3166
3167 /* distribution [33] */
3168
3169 if(TRUE) {
3170 unur_reset_errno();
3171 do {
3172 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[33]);
3173 par = unur_cstd_new(distr_localcopy);
3174 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3175 gen = unur_init(par);
3176 rcode = run_validate_chi2(TESTLOG,0,gen,distr[33],'+');
3177 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3178 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3179 unur_free(gen);
3180 unur_distr_free(distr_localcopy);
3181 } while (0);
3182 }
3183
3184 if(TRUE) {
3185 printf("."); fflush(stdout);
3186 }
3187
3188 if(TRUE) {
3189 printf("."); fflush(stdout);
3190 }
3191
3192 if(TRUE) {
3193 printf("."); fflush(stdout);
3194 }
3195
3196 if(TRUE) {
3197 printf("."); fflush(stdout);
3198 }
3199
3200 if(TRUE) {
3201 printf("."); fflush(stdout);
3202 }
3203
3204 if(TRUE) {
3205 printf("."); fflush(stdout);
3206 }
3207
3208 if(TRUE) {
3209 printf("."); fflush(stdout);
3210 }
3211
3212 if(TRUE) {
3213 printf("."); fflush(stdout);
3214 }
3215
3216 if(TRUE) {
3217 printf("."); fflush(stdout);
3218 }
3219
3220 if(TRUE) {
3221 unur_reset_errno();
3222 do {
3223 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[33]);
3224 par = unur_cstd_new(distr_localcopy);
3225 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3226 gen = unur_init(par);
3227 if (gen) {
3228 unur_cstd_chg_truncated(gen,0.5,0.55);
3229 }
3230 rcode = run_validate_chi2(TESTLOG,0,gen,distr[33],'+');
3231 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3232 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3233 unur_free(gen);
3234 unur_distr_free(distr_localcopy);
3235 } while (0);
3236 }
3237
3238 if(TRUE) {
3239 unur_reset_errno();
3240 do {
3241 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[33]);
3242 { UNUR_DISTR *dg =NULL;
3243 par = unur_cstd_new(distr_localcopy);
3244 fpm[0] = 2.;
3245 fpm[1] = 5.;
3246 gen = unur_init(par);
3247 if (gen) {
3248 dg = unur_get_distr(gen);
3249 unur_distr_cont_set_pdfparams(dg,fpm,2);
3250 unur_reinit(gen); }
3251 }
3252 rcode = run_validate_chi2(TESTLOG,0,gen,distr[33],'+');
3253 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3254 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3255 unur_free(gen);
3256 unur_distr_free(distr_localcopy);
3257 } while (0);
3258 }
3259
3260 /* distribution [34] */
3261
3262 if(TRUE) {
3263 unur_reset_errno();
3264 do {
3265 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[34]);
3266 par = unur_cstd_new(distr_localcopy);
3267 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3268 gen = unur_init(par);
3269 rcode = run_validate_chi2(TESTLOG,0,gen,distr[34],'+');
3270 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3271 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3272 unur_free(gen);
3273 unur_distr_free(distr_localcopy);
3274 } while (0);
3275 }
3276
3277 if(TRUE) {
3278 printf("."); fflush(stdout);
3279 }
3280
3281 if(TRUE) {
3282 printf("."); fflush(stdout);
3283 }
3284
3285 if(TRUE) {
3286 printf("."); fflush(stdout);
3287 }
3288
3289 if(TRUE) {
3290 printf("."); fflush(stdout);
3291 }
3292
3293 if(TRUE) {
3294 printf("."); fflush(stdout);
3295 }
3296
3297 if(TRUE) {
3298 printf("."); fflush(stdout);
3299 }
3300
3301 if(TRUE) {
3302 printf("."); fflush(stdout);
3303 }
3304
3305 if(TRUE) {
3306 printf("."); fflush(stdout);
3307 }
3308
3309 if(TRUE) {
3310 printf("."); fflush(stdout);
3311 }
3312
3313 if(TRUE) {
3314 unur_reset_errno();
3315 do {
3316 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[34]);
3317 par = unur_cstd_new(distr_localcopy);
3318 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3319 gen = unur_init(par);
3320 if (gen) {
3321 unur_cstd_chg_truncated(gen,0.5,0.55);
3322 }
3323 rcode = run_validate_chi2(TESTLOG,0,gen,distr[34],'+');
3324 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3325 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3326 unur_free(gen);
3327 unur_distr_free(distr_localcopy);
3328 } while (0);
3329 }
3330
3331 if(TRUE) {
3332 unur_reset_errno();
3333 do {
3334 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[34]);
3335 { UNUR_DISTR *dg =NULL;
3336 par = unur_cstd_new(distr_localcopy);
3337 fpm[0] = 2.;
3338 fpm[1] = 5.;
3339 gen = unur_init(par);
3340 if (gen) {
3341 dg = unur_get_distr(gen);
3342 unur_distr_cont_set_pdfparams(dg,fpm,2);
3343 unur_reinit(gen); }
3344 }
3345 rcode = run_validate_chi2(TESTLOG,0,gen,distr[34],'+');
3346 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3347 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3348 unur_free(gen);
3349 unur_distr_free(distr_localcopy);
3350 } while (0);
3351 }
3352
3353 /* distribution [35] */
3354
3355 if(TRUE) {
3356 unur_reset_errno();
3357 do {
3358 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[35]);
3359 par = unur_cstd_new(distr_localcopy);
3360 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3361 gen = unur_init(par);
3362 rcode = run_validate_chi2(TESTLOG,0,gen,distr[35],'+');
3363 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3364 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3365 unur_free(gen);
3366 unur_distr_free(distr_localcopy);
3367 } while (0);
3368 }
3369
3370 if(TRUE) {
3371 printf("."); fflush(stdout);
3372 }
3373
3374 if(TRUE) {
3375 printf("."); fflush(stdout);
3376 }
3377
3378 if(TRUE) {
3379 printf("."); fflush(stdout);
3380 }
3381
3382 if(TRUE) {
3383 printf("."); fflush(stdout);
3384 }
3385
3386 if(TRUE) {
3387 printf("."); fflush(stdout);
3388 }
3389
3390 if(TRUE) {
3391 printf("."); fflush(stdout);
3392 }
3393
3394 if(TRUE) {
3395 printf("."); fflush(stdout);
3396 }
3397
3398 if(TRUE) {
3399 printf("."); fflush(stdout);
3400 }
3401
3402 if(TRUE) {
3403 printf("."); fflush(stdout);
3404 }
3405
3406 if(TRUE) {
3407 unur_reset_errno();
3408 do {
3409 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[35]);
3410 par = unur_cstd_new(distr_localcopy);
3411 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3412 gen = unur_init(par);
3413 if (gen) {
3414 unur_cstd_chg_truncated(gen,0.5,0.55);
3415 }
3416 rcode = run_validate_chi2(TESTLOG,0,gen,distr[35],'+');
3417 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3418 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3419 unur_free(gen);
3420 unur_distr_free(distr_localcopy);
3421 } while (0);
3422 }
3423
3424 if(TRUE) {
3425 unur_reset_errno();
3426 do {
3427 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[35]);
3428 { UNUR_DISTR *dg =NULL;
3429 par = unur_cstd_new(distr_localcopy);
3430 fpm[0] = 2.;
3431 fpm[1] = 5.;
3432 gen = unur_init(par);
3433 if (gen) {
3434 dg = unur_get_distr(gen);
3435 unur_distr_cont_set_pdfparams(dg,fpm,2);
3436 unur_reinit(gen); }
3437 }
3438 rcode = run_validate_chi2(TESTLOG,0,gen,distr[35],'+');
3439 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3440 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3441 unur_free(gen);
3442 unur_distr_free(distr_localcopy);
3443 } while (0);
3444 }
3445
3446 /* distribution [9] */
3447
3448 if(TRUE) {
3449 printf("."); fflush(stdout);
3450 }
3451
3452 if(TRUE) {
3453 unur_reset_errno();
3454 do {
3455 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[9]);
3456 par = unur_cstd_new(distr_localcopy);
3457 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3458 gen = unur_init(par);
3459 rcode = run_validate_chi2(TESTLOG,0,gen,distr[9],'+');
3460 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3461 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3462 unur_free(gen);
3463 unur_distr_free(distr_localcopy);
3464 } while (0);
3465 }
3466
3467 if(TRUE) {
3468 unur_reset_errno();
3469 do {
3470 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[9]);
3471 par = unur_cstd_new(distr_localcopy);
3472 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3473 gen = unur_init(par);
3474 rcode = run_validate_chi2(TESTLOG,0,gen,distr[9],'+');
3475 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3476 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3477 unur_free(gen);
3478 unur_distr_free(distr_localcopy);
3479 } while (0);
3480 }
3481
3482 if(TRUE) {
3483 printf("."); fflush(stdout);
3484 }
3485
3486 if(TRUE) {
3487 printf("."); fflush(stdout);
3488 }
3489
3490 if(TRUE) {
3491 printf("."); fflush(stdout);
3492 }
3493
3494 if(TRUE) {
3495 printf("."); fflush(stdout);
3496 }
3497
3498 if(TRUE) {
3499 printf("."); fflush(stdout);
3500 }
3501
3502 if(TRUE) {
3503 printf("."); fflush(stdout);
3504 }
3505
3506 if(TRUE) {
3507 printf("."); fflush(stdout);
3508 }
3509
3510 if(TRUE) {
3511 printf("."); fflush(stdout);
3512 }
3513
3514 if(TRUE) {
3515 unur_reset_errno();
3516 do {
3517 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[9]);
3518 { UNUR_DISTR *dg =NULL;
3519 par = unur_cstd_new(distr_localcopy);
3520 fpm[0] = 2.;
3521 fpm[1] = 5.;
3522 gen = unur_init(par);
3523 if (gen) {
3524 dg = unur_get_distr(gen);
3525 unur_distr_cont_set_pdfparams(dg,fpm,2);
3526 unur_reinit(gen); }
3527 }
3528 rcode = run_validate_chi2(TESTLOG,0,gen,distr[9],'+');
3529 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3530 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3531 unur_free(gen);
3532 unur_distr_free(distr_localcopy);
3533 } while (0);
3534 }
3535
3536 /* distribution [10] */
3537
3538 if(fullcheck) {
3539 printf("."); fflush(stdout);
3540 }
3541
3542 if(fullcheck) {
3543 unur_reset_errno();
3544 do {
3545 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[10]);
3546 par = unur_cstd_new(distr_localcopy);
3547 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3548 gen = unur_init(par);
3549 rcode = run_validate_chi2(TESTLOG,0,gen,distr[10],'+');
3550 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3551 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3552 unur_free(gen);
3553 unur_distr_free(distr_localcopy);
3554 } while (0);
3555 }
3556
3557 if(fullcheck) {
3558 unur_reset_errno();
3559 do {
3560 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[10]);
3561 par = unur_cstd_new(distr_localcopy);
3562 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3563 gen = unur_init(par);
3564 rcode = run_validate_chi2(TESTLOG,0,gen,distr[10],'+');
3565 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3566 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3567 unur_free(gen);
3568 unur_distr_free(distr_localcopy);
3569 } while (0);
3570 }
3571
3572 if(fullcheck) {
3573 printf("."); fflush(stdout);
3574 }
3575
3576 if(fullcheck) {
3577 printf("."); fflush(stdout);
3578 }
3579
3580 if(fullcheck) {
3581 printf("."); fflush(stdout);
3582 }
3583
3584 if(fullcheck) {
3585 printf("."); fflush(stdout);
3586 }
3587
3588 if(fullcheck) {
3589 printf("."); fflush(stdout);
3590 }
3591
3592 if(fullcheck) {
3593 printf("."); fflush(stdout);
3594 }
3595
3596 if(fullcheck) {
3597 printf("."); fflush(stdout);
3598 }
3599
3600 if(fullcheck) {
3601 printf("."); fflush(stdout);
3602 }
3603
3604 if(fullcheck) {
3605 unur_reset_errno();
3606 do {
3607 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[10]);
3608 { UNUR_DISTR *dg =NULL;
3609 par = unur_cstd_new(distr_localcopy);
3610 fpm[0] = 2.;
3611 fpm[1] = 5.;
3612 gen = unur_init(par);
3613 if (gen) {
3614 dg = unur_get_distr(gen);
3615 unur_distr_cont_set_pdfparams(dg,fpm,2);
3616 unur_reinit(gen); }
3617 }
3618 rcode = run_validate_chi2(TESTLOG,0,gen,distr[10],'+');
3619 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3620 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3621 unur_free(gen);
3622 unur_distr_free(distr_localcopy);
3623 } while (0);
3624 }
3625
3626 /* distribution [11] */
3627
3628 if(TRUE) {
3629 printf("."); fflush(stdout);
3630 }
3631
3632 if(TRUE) {
3633 unur_reset_errno();
3634 do {
3635 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[11]);
3636 par = unur_cstd_new(distr_localcopy);
3637 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3638 gen = unur_init(par);
3639 rcode = run_validate_chi2(TESTLOG,0,gen,distr[11],'+');
3640 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3641 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3642 unur_free(gen);
3643 unur_distr_free(distr_localcopy);
3644 } while (0);
3645 }
3646
3647 if(TRUE) {
3648 unur_reset_errno();
3649 do {
3650 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[11]);
3651 par = unur_cstd_new(distr_localcopy);
3652 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3653 gen = unur_init(par);
3654 rcode = run_validate_chi2(TESTLOG,0,gen,distr[11],'+');
3655 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3656 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3657 unur_free(gen);
3658 unur_distr_free(distr_localcopy);
3659 } while (0);
3660 }
3661
3662 if(TRUE) {
3663 printf("."); fflush(stdout);
3664 }
3665
3666 if(TRUE) {
3667 printf("."); fflush(stdout);
3668 }
3669
3670 if(TRUE) {
3671 printf("."); fflush(stdout);
3672 }
3673
3674 if(TRUE) {
3675 printf("."); fflush(stdout);
3676 }
3677
3678 if(TRUE) {
3679 printf("."); fflush(stdout);
3680 }
3681
3682 if(TRUE) {
3683 printf("."); fflush(stdout);
3684 }
3685
3686 if(TRUE) {
3687 printf("."); fflush(stdout);
3688 }
3689
3690 if(TRUE) {
3691 printf("."); fflush(stdout);
3692 }
3693
3694 if(TRUE) {
3695 unur_reset_errno();
3696 do {
3697 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[11]);
3698 { UNUR_DISTR *dg =NULL;
3699 par = unur_cstd_new(distr_localcopy);
3700 fpm[0] = 2.;
3701 fpm[1] = 5.;
3702 gen = unur_init(par);
3703 if (gen) {
3704 dg = unur_get_distr(gen);
3705 unur_distr_cont_set_pdfparams(dg,fpm,2);
3706 unur_reinit(gen); }
3707 }
3708 rcode = run_validate_chi2(TESTLOG,0,gen,distr[11],'+');
3709 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3710 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3711 unur_free(gen);
3712 unur_distr_free(distr_localcopy);
3713 } while (0);
3714 }
3715
3716 /* distribution [12] */
3717
3718 if(TRUE) {
3719 printf("."); fflush(stdout);
3720 }
3721
3722 if(TRUE) {
3723 unur_reset_errno();
3724 do {
3725 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[12]);
3726 par = unur_cstd_new(distr_localcopy);
3727 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3728 gen = unur_init(par);
3729 rcode = run_validate_chi2(TESTLOG,0,gen,distr[12],'+');
3730 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3731 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3732 unur_free(gen);
3733 unur_distr_free(distr_localcopy);
3734 } while (0);
3735 }
3736
3737 if(TRUE) {
3738 unur_reset_errno();
3739 do {
3740 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[12]);
3741 par = unur_cstd_new(distr_localcopy);
3742 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3743 gen = unur_init(par);
3744 rcode = run_validate_chi2(TESTLOG,0,gen,distr[12],'+');
3745 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3746 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3747 unur_free(gen);
3748 unur_distr_free(distr_localcopy);
3749 } while (0);
3750 }
3751
3752 if(TRUE) {
3753 printf("."); fflush(stdout);
3754 }
3755
3756 if(TRUE) {
3757 printf("."); fflush(stdout);
3758 }
3759
3760 if(TRUE) {
3761 printf("."); fflush(stdout);
3762 }
3763
3764 if(TRUE) {
3765 printf("."); fflush(stdout);
3766 }
3767
3768 if(TRUE) {
3769 printf("."); fflush(stdout);
3770 }
3771
3772 if(TRUE) {
3773 printf("."); fflush(stdout);
3774 }
3775
3776 if(TRUE) {
3777 printf("."); fflush(stdout);
3778 }
3779
3780 if(TRUE) {
3781 printf("."); fflush(stdout);
3782 }
3783
3784 if(TRUE) {
3785 unur_reset_errno();
3786 do {
3787 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[12]);
3788 { UNUR_DISTR *dg =NULL;
3789 par = unur_cstd_new(distr_localcopy);
3790 fpm[0] = 2.;
3791 fpm[1] = 5.;
3792 gen = unur_init(par);
3793 if (gen) {
3794 dg = unur_get_distr(gen);
3795 unur_distr_cont_set_pdfparams(dg,fpm,2);
3796 unur_reinit(gen); }
3797 }
3798 rcode = run_validate_chi2(TESTLOG,0,gen,distr[12],'+');
3799 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3800 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3801 unur_free(gen);
3802 unur_distr_free(distr_localcopy);
3803 } while (0);
3804 }
3805
3806 /* distribution [13] */
3807
3808 if(fullcheck) {
3809 printf("."); fflush(stdout);
3810 }
3811
3812 if(fullcheck) {
3813 unur_reset_errno();
3814 do {
3815 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[13]);
3816 par = unur_cstd_new(distr_localcopy);
3817 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3818 gen = unur_init(par);
3819 rcode = run_validate_chi2(TESTLOG,0,gen,distr[13],'+');
3820 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3821 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3822 unur_free(gen);
3823 unur_distr_free(distr_localcopy);
3824 } while (0);
3825 }
3826
3827 if(fullcheck) {
3828 unur_reset_errno();
3829 do {
3830 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[13]);
3831 par = unur_cstd_new(distr_localcopy);
3832 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3833 gen = unur_init(par);
3834 rcode = run_validate_chi2(TESTLOG,0,gen,distr[13],'+');
3835 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3836 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3837 unur_free(gen);
3838 unur_distr_free(distr_localcopy);
3839 } while (0);
3840 }
3841
3842 if(fullcheck) {
3843 printf("."); fflush(stdout);
3844 }
3845
3846 if(fullcheck) {
3847 printf("."); fflush(stdout);
3848 }
3849
3850 if(fullcheck) {
3851 printf("."); fflush(stdout);
3852 }
3853
3854 if(fullcheck) {
3855 printf("."); fflush(stdout);
3856 }
3857
3858 if(fullcheck) {
3859 printf("."); fflush(stdout);
3860 }
3861
3862 if(fullcheck) {
3863 printf("."); fflush(stdout);
3864 }
3865
3866 if(fullcheck) {
3867 printf("."); fflush(stdout);
3868 }
3869
3870 if(fullcheck) {
3871 printf("."); fflush(stdout);
3872 }
3873
3874 if(fullcheck) {
3875 unur_reset_errno();
3876 do {
3877 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[13]);
3878 { UNUR_DISTR *dg =NULL;
3879 par = unur_cstd_new(distr_localcopy);
3880 fpm[0] = 2.;
3881 fpm[1] = 5.;
3882 gen = unur_init(par);
3883 if (gen) {
3884 dg = unur_get_distr(gen);
3885 unur_distr_cont_set_pdfparams(dg,fpm,2);
3886 unur_reinit(gen); }
3887 }
3888 rcode = run_validate_chi2(TESTLOG,0,gen,distr[13],'+');
3889 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3890 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3891 unur_free(gen);
3892 unur_distr_free(distr_localcopy);
3893 } while (0);
3894 }
3895
3896 /* distribution [14] */
3897
3898 if(TRUE) {
3899 printf("."); fflush(stdout);
3900 }
3901
3902 if(TRUE) {
3903 unur_reset_errno();
3904 do {
3905 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[14]);
3906 par = unur_cstd_new(distr_localcopy);
3907 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3908 gen = unur_init(par);
3909 rcode = run_validate_chi2(TESTLOG,0,gen,distr[14],'+');
3910 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3911 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3912 unur_free(gen);
3913 unur_distr_free(distr_localcopy);
3914 } while (0);
3915 }
3916
3917 if(TRUE) {
3918 unur_reset_errno();
3919 do {
3920 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[14]);
3921 par = unur_cstd_new(distr_localcopy);
3922 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3923 gen = unur_init(par);
3924 rcode = run_validate_chi2(TESTLOG,0,gen,distr[14],'+');
3925 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3926 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3927 unur_free(gen);
3928 unur_distr_free(distr_localcopy);
3929 } while (0);
3930 }
3931
3932 if(TRUE) {
3933 printf("."); fflush(stdout);
3934 }
3935
3936 if(TRUE) {
3937 printf("."); fflush(stdout);
3938 }
3939
3940 if(TRUE) {
3941 printf("."); fflush(stdout);
3942 }
3943
3944 if(TRUE) {
3945 printf("."); fflush(stdout);
3946 }
3947
3948 if(TRUE) {
3949 printf("."); fflush(stdout);
3950 }
3951
3952 if(TRUE) {
3953 printf("."); fflush(stdout);
3954 }
3955
3956 if(TRUE) {
3957 printf("."); fflush(stdout);
3958 }
3959
3960 if(TRUE) {
3961 printf("."); fflush(stdout);
3962 }
3963
3964 if(TRUE) {
3965 unur_reset_errno();
3966 do {
3967 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[14]);
3968 { UNUR_DISTR *dg =NULL;
3969 par = unur_cstd_new(distr_localcopy);
3970 fpm[0] = 2.;
3971 fpm[1] = 5.;
3972 gen = unur_init(par);
3973 if (gen) {
3974 dg = unur_get_distr(gen);
3975 unur_distr_cont_set_pdfparams(dg,fpm,2);
3976 unur_reinit(gen); }
3977 }
3978 rcode = run_validate_chi2(TESTLOG,0,gen,distr[14],'+');
3979 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
3980 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
3981 unur_free(gen);
3982 unur_distr_free(distr_localcopy);
3983 } while (0);
3984 }
3985
3986 /* distribution [15] */
3987
3988 if(fullcheck) {
3989 printf("."); fflush(stdout);
3990 }
3991
3992 if(fullcheck) {
3993 unur_reset_errno();
3994 do {
3995 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[15]);
3996 par = unur_cstd_new(distr_localcopy);
3997 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
3998 gen = unur_init(par);
3999 rcode = run_validate_chi2(TESTLOG,0,gen,distr[15],'+');
4000 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4001 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4002 unur_free(gen);
4003 unur_distr_free(distr_localcopy);
4004 } while (0);
4005 }
4006
4007 if(fullcheck) {
4008 unur_reset_errno();
4009 do {
4010 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[15]);
4011 par = unur_cstd_new(distr_localcopy);
4012 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4013 gen = unur_init(par);
4014 rcode = run_validate_chi2(TESTLOG,0,gen,distr[15],'+');
4015 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4016 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4017 unur_free(gen);
4018 unur_distr_free(distr_localcopy);
4019 } while (0);
4020 }
4021
4022 if(fullcheck) {
4023 printf("."); fflush(stdout);
4024 }
4025
4026 if(fullcheck) {
4027 printf("."); fflush(stdout);
4028 }
4029
4030 if(fullcheck) {
4031 printf("."); fflush(stdout);
4032 }
4033
4034 if(fullcheck) {
4035 printf("."); fflush(stdout);
4036 }
4037
4038 if(fullcheck) {
4039 printf("."); fflush(stdout);
4040 }
4041
4042 if(fullcheck) {
4043 printf("."); fflush(stdout);
4044 }
4045
4046 if(fullcheck) {
4047 printf("."); fflush(stdout);
4048 }
4049
4050 if(fullcheck) {
4051 printf("."); fflush(stdout);
4052 }
4053
4054 if(fullcheck) {
4055 unur_reset_errno();
4056 do {
4057 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[15]);
4058 { UNUR_DISTR *dg =NULL;
4059 par = unur_cstd_new(distr_localcopy);
4060 fpm[0] = 2.;
4061 fpm[1] = 5.;
4062 gen = unur_init(par);
4063 if (gen) {
4064 dg = unur_get_distr(gen);
4065 unur_distr_cont_set_pdfparams(dg,fpm,2);
4066 unur_reinit(gen); }
4067 }
4068 rcode = run_validate_chi2(TESTLOG,0,gen,distr[15],'+');
4069 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4070 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4071 unur_free(gen);
4072 unur_distr_free(distr_localcopy);
4073 } while (0);
4074 }
4075
4076 /* distribution [16] */
4077
4078 if(fullcheck) {
4079 printf("."); fflush(stdout);
4080 }
4081
4082 if(fullcheck) {
4083 unur_reset_errno();
4084 do {
4085 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[16]);
4086 par = unur_cstd_new(distr_localcopy);
4087 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4088 gen = unur_init(par);
4089 rcode = run_validate_chi2(TESTLOG,0,gen,distr[16],'+');
4090 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4091 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4092 unur_free(gen);
4093 unur_distr_free(distr_localcopy);
4094 } while (0);
4095 }
4096
4097 if(fullcheck) {
4098 unur_reset_errno();
4099 do {
4100 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[16]);
4101 par = unur_cstd_new(distr_localcopy);
4102 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4103 gen = unur_init(par);
4104 rcode = run_validate_chi2(TESTLOG,0,gen,distr[16],'+');
4105 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4106 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4107 unur_free(gen);
4108 unur_distr_free(distr_localcopy);
4109 } while (0);
4110 }
4111
4112 if(fullcheck) {
4113 printf("."); fflush(stdout);
4114 }
4115
4116 if(fullcheck) {
4117 printf("."); fflush(stdout);
4118 }
4119
4120 if(fullcheck) {
4121 printf("."); fflush(stdout);
4122 }
4123
4124 if(fullcheck) {
4125 printf("."); fflush(stdout);
4126 }
4127
4128 if(fullcheck) {
4129 printf("."); fflush(stdout);
4130 }
4131
4132 if(fullcheck) {
4133 printf("."); fflush(stdout);
4134 }
4135
4136 if(fullcheck) {
4137 printf("."); fflush(stdout);
4138 }
4139
4140 if(fullcheck) {
4141 printf("."); fflush(stdout);
4142 }
4143
4144 if(fullcheck) {
4145 unur_reset_errno();
4146 do {
4147 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[16]);
4148 { UNUR_DISTR *dg =NULL;
4149 par = unur_cstd_new(distr_localcopy);
4150 fpm[0] = 2.;
4151 fpm[1] = 5.;
4152 gen = unur_init(par);
4153 if (gen) {
4154 dg = unur_get_distr(gen);
4155 unur_distr_cont_set_pdfparams(dg,fpm,2);
4156 unur_reinit(gen); }
4157 }
4158 rcode = run_validate_chi2(TESTLOG,0,gen,distr[16],'+');
4159 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4160 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4161 unur_free(gen);
4162 unur_distr_free(distr_localcopy);
4163 } while (0);
4164 }
4165
4166 /* distribution [63] */
4167
4168 if(TRUE) {
4169 printf("."); fflush(stdout);
4170 }
4171
4172 if(TRUE) {
4173 unur_reset_errno();
4174 do {
4175 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[63]);
4176 par = unur_cstd_new(distr_localcopy);
4177 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4178 gen = unur_init(par);
4179 rcode = run_validate_chi2(TESTLOG,0,gen,distr[63],'+');
4180 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4181 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4182 unur_free(gen);
4183 unur_distr_free(distr_localcopy);
4184 } while (0);
4185 }
4186
4187 if(TRUE) {
4188 unur_reset_errno();
4189 do {
4190 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[63]);
4191 par = unur_cstd_new(distr_localcopy);
4192 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4193 gen = unur_init(par);
4194 rcode = run_validate_chi2(TESTLOG,0,gen,distr[63],'+');
4195 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4196 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4197 unur_free(gen);
4198 unur_distr_free(distr_localcopy);
4199 } while (0);
4200 }
4201
4202 if(TRUE) {
4203 printf("."); fflush(stdout);
4204 }
4205
4206 if(TRUE) {
4207 printf("."); fflush(stdout);
4208 }
4209
4210 if(TRUE) {
4211 printf("."); fflush(stdout);
4212 }
4213
4214 if(TRUE) {
4215 printf("."); fflush(stdout);
4216 }
4217
4218 if(TRUE) {
4219 printf("."); fflush(stdout);
4220 }
4221
4222 if(TRUE) {
4223 printf("."); fflush(stdout);
4224 }
4225
4226 if(TRUE) {
4227 printf("."); fflush(stdout);
4228 }
4229
4230 if(TRUE) {
4231 printf("."); fflush(stdout);
4232 }
4233
4234 if(TRUE) {
4235 unur_reset_errno();
4236 do {
4237 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[63]);
4238 { UNUR_DISTR *dg =NULL;
4239 par = unur_cstd_new(distr_localcopy);
4240 fpm[0] = 2.;
4241 fpm[1] = 5.;
4242 gen = unur_init(par);
4243 if (gen) {
4244 dg = unur_get_distr(gen);
4245 unur_distr_cont_set_pdfparams(dg,fpm,2);
4246 unur_reinit(gen); }
4247 }
4248 rcode = run_validate_chi2(TESTLOG,0,gen,distr[63],'+');
4249 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4250 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4251 unur_free(gen);
4252 unur_distr_free(distr_localcopy);
4253 } while (0);
4254 }
4255
4256 /* distribution [64] */
4257
4258 if(fullcheck) {
4259 printf("."); fflush(stdout);
4260 }
4261
4262 if(fullcheck) {
4263 unur_reset_errno();
4264 do {
4265 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[64]);
4266 par = unur_cstd_new(distr_localcopy);
4267 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4268 gen = unur_init(par);
4269 rcode = run_validate_chi2(TESTLOG,0,gen,distr[64],'+');
4270 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4271 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4272 unur_free(gen);
4273 unur_distr_free(distr_localcopy);
4274 } while (0);
4275 }
4276
4277 if(fullcheck) {
4278 unur_reset_errno();
4279 do {
4280 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[64]);
4281 par = unur_cstd_new(distr_localcopy);
4282 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4283 gen = unur_init(par);
4284 rcode = run_validate_chi2(TESTLOG,0,gen,distr[64],'+');
4285 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4286 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4287 unur_free(gen);
4288 unur_distr_free(distr_localcopy);
4289 } while (0);
4290 }
4291
4292 if(fullcheck) {
4293 printf("."); fflush(stdout);
4294 }
4295
4296 if(fullcheck) {
4297 printf("."); fflush(stdout);
4298 }
4299
4300 if(fullcheck) {
4301 printf("."); fflush(stdout);
4302 }
4303
4304 if(fullcheck) {
4305 printf("."); fflush(stdout);
4306 }
4307
4308 if(fullcheck) {
4309 printf("."); fflush(stdout);
4310 }
4311
4312 if(fullcheck) {
4313 printf("."); fflush(stdout);
4314 }
4315
4316 if(fullcheck) {
4317 printf("."); fflush(stdout);
4318 }
4319
4320 if(fullcheck) {
4321 printf("."); fflush(stdout);
4322 }
4323
4324 if(fullcheck) {
4325 unur_reset_errno();
4326 do {
4327 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[64]);
4328 { UNUR_DISTR *dg =NULL;
4329 par = unur_cstd_new(distr_localcopy);
4330 fpm[0] = 2.;
4331 fpm[1] = 5.;
4332 gen = unur_init(par);
4333 if (gen) {
4334 dg = unur_get_distr(gen);
4335 unur_distr_cont_set_pdfparams(dg,fpm,2);
4336 unur_reinit(gen); }
4337 }
4338 rcode = run_validate_chi2(TESTLOG,0,gen,distr[64],'+');
4339 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4340 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4341 unur_free(gen);
4342 unur_distr_free(distr_localcopy);
4343 } while (0);
4344 }
4345
4346 /* distribution [36] */
4347
4348 if(TRUE) {
4349 unur_reset_errno();
4350 do {
4351 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[36]);
4352 par = unur_cstd_new(distr_localcopy);
4353 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4354 gen = unur_init(par);
4355 rcode = run_validate_chi2(TESTLOG,0,gen,distr[36],'+');
4356 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4357 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4358 unur_free(gen);
4359 unur_distr_free(distr_localcopy);
4360 } while (0);
4361 }
4362
4363 if(TRUE) {
4364 printf("."); fflush(stdout);
4365 }
4366
4367 if(TRUE) {
4368 printf("."); fflush(stdout);
4369 }
4370
4371 if(TRUE) {
4372 printf("."); fflush(stdout);
4373 }
4374
4375 if(TRUE) {
4376 printf("."); fflush(stdout);
4377 }
4378
4379 if(TRUE) {
4380 printf("."); fflush(stdout);
4381 }
4382
4383 if(TRUE) {
4384 printf("."); fflush(stdout);
4385 }
4386
4387 if(TRUE) {
4388 printf("."); fflush(stdout);
4389 }
4390
4391 if(TRUE) {
4392 printf("."); fflush(stdout);
4393 }
4394
4395 if(TRUE) {
4396 printf("."); fflush(stdout);
4397 }
4398
4399 if(TRUE) {
4400 unur_reset_errno();
4401 do {
4402 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[36]);
4403 par = unur_cstd_new(distr_localcopy);
4404 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4405 gen = unur_init(par);
4406 if (gen) {
4407 unur_cstd_chg_truncated(gen,0.5,0.55);
4408 }
4409 rcode = run_validate_chi2(TESTLOG,0,gen,distr[36],'+');
4410 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4411 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4412 unur_free(gen);
4413 unur_distr_free(distr_localcopy);
4414 } while (0);
4415 }
4416
4417 if(TRUE) {
4418 unur_reset_errno();
4419 do {
4420 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[36]);
4421 { UNUR_DISTR *dg =NULL;
4422 par = unur_cstd_new(distr_localcopy);
4423 fpm[0] = 2.;
4424 fpm[1] = 5.;
4425 gen = unur_init(par);
4426 if (gen) {
4427 dg = unur_get_distr(gen);
4428 unur_distr_cont_set_pdfparams(dg,fpm,2);
4429 unur_reinit(gen); }
4430 }
4431 rcode = run_validate_chi2(TESTLOG,0,gen,distr[36],'+');
4432 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4433 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4434 unur_free(gen);
4435 unur_distr_free(distr_localcopy);
4436 } while (0);
4437 }
4438
4439 /* distribution [37] */
4440
4441 if(TRUE) {
4442 unur_reset_errno();
4443 do {
4444 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[37]);
4445 par = unur_cstd_new(distr_localcopy);
4446 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4447 gen = unur_init(par);
4448 rcode = run_validate_chi2(TESTLOG,0,gen,distr[37],'+');
4449 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4450 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4451 unur_free(gen);
4452 unur_distr_free(distr_localcopy);
4453 } while (0);
4454 }
4455
4456 if(TRUE) {
4457 printf("."); fflush(stdout);
4458 }
4459
4460 if(TRUE) {
4461 printf("."); fflush(stdout);
4462 }
4463
4464 if(TRUE) {
4465 printf("."); fflush(stdout);
4466 }
4467
4468 if(TRUE) {
4469 printf("."); fflush(stdout);
4470 }
4471
4472 if(TRUE) {
4473 printf("."); fflush(stdout);
4474 }
4475
4476 if(TRUE) {
4477 printf("."); fflush(stdout);
4478 }
4479
4480 if(TRUE) {
4481 printf("."); fflush(stdout);
4482 }
4483
4484 if(TRUE) {
4485 printf("."); fflush(stdout);
4486 }
4487
4488 if(TRUE) {
4489 printf("."); fflush(stdout);
4490 }
4491
4492 if(TRUE) {
4493 unur_reset_errno();
4494 do {
4495 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[37]);
4496 par = unur_cstd_new(distr_localcopy);
4497 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4498 gen = unur_init(par);
4499 if (gen) {
4500 unur_cstd_chg_truncated(gen,0.5,0.55);
4501 }
4502 rcode = run_validate_chi2(TESTLOG,0,gen,distr[37],'+');
4503 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4504 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4505 unur_free(gen);
4506 unur_distr_free(distr_localcopy);
4507 } while (0);
4508 }
4509
4510 if(TRUE) {
4511 unur_reset_errno();
4512 do {
4513 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[37]);
4514 { UNUR_DISTR *dg =NULL;
4515 par = unur_cstd_new(distr_localcopy);
4516 fpm[0] = 2.;
4517 fpm[1] = 5.;
4518 gen = unur_init(par);
4519 if (gen) {
4520 dg = unur_get_distr(gen);
4521 unur_distr_cont_set_pdfparams(dg,fpm,2);
4522 unur_reinit(gen); }
4523 }
4524 rcode = run_validate_chi2(TESTLOG,0,gen,distr[37],'+');
4525 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4526 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4527 unur_free(gen);
4528 unur_distr_free(distr_localcopy);
4529 } while (0);
4530 }
4531
4532 /* distribution [38] */
4533
4534 if(TRUE) {
4535 unur_reset_errno();
4536 do {
4537 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[38]);
4538 par = unur_cstd_new(distr_localcopy);
4539 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4540 gen = unur_init(par);
4541 rcode = run_validate_chi2(TESTLOG,0,gen,distr[38],'+');
4542 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4543 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4544 unur_free(gen);
4545 unur_distr_free(distr_localcopy);
4546 } while (0);
4547 }
4548
4549 if(TRUE) {
4550 printf("."); fflush(stdout);
4551 }
4552
4553 if(TRUE) {
4554 printf("."); fflush(stdout);
4555 }
4556
4557 if(TRUE) {
4558 printf("."); fflush(stdout);
4559 }
4560
4561 if(TRUE) {
4562 printf("."); fflush(stdout);
4563 }
4564
4565 if(TRUE) {
4566 printf("."); fflush(stdout);
4567 }
4568
4569 if(TRUE) {
4570 printf("."); fflush(stdout);
4571 }
4572
4573 if(TRUE) {
4574 printf("."); fflush(stdout);
4575 }
4576
4577 if(TRUE) {
4578 printf("."); fflush(stdout);
4579 }
4580
4581 if(TRUE) {
4582 printf("."); fflush(stdout);
4583 }
4584
4585 if(TRUE) {
4586 unur_reset_errno();
4587 do {
4588 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[38]);
4589 par = unur_cstd_new(distr_localcopy);
4590 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4591 gen = unur_init(par);
4592 if (gen) {
4593 unur_cstd_chg_truncated(gen,0.5,0.55);
4594 }
4595 rcode = run_validate_chi2(TESTLOG,0,gen,distr[38],'+');
4596 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4597 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4598 unur_free(gen);
4599 unur_distr_free(distr_localcopy);
4600 } while (0);
4601 }
4602
4603 if(TRUE) {
4604 unur_reset_errno();
4605 do {
4606 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[38]);
4607 { UNUR_DISTR *dg =NULL;
4608 par = unur_cstd_new(distr_localcopy);
4609 fpm[0] = 2.;
4610 fpm[1] = 5.;
4611 gen = unur_init(par);
4612 if (gen) {
4613 dg = unur_get_distr(gen);
4614 unur_distr_cont_set_pdfparams(dg,fpm,2);
4615 unur_reinit(gen); }
4616 }
4617 rcode = run_validate_chi2(TESTLOG,0,gen,distr[38],'+');
4618 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4619 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4620 unur_free(gen);
4621 unur_distr_free(distr_localcopy);
4622 } while (0);
4623 }
4624
4625 /* distribution [39] */
4626
4627 if(TRUE) {
4628 unur_reset_errno();
4629 do {
4630 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[39]);
4631 par = unur_cstd_new(distr_localcopy);
4632 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4633 gen = unur_init(par);
4634 rcode = run_validate_chi2(TESTLOG,0,gen,distr[39],'+');
4635 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4636 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4637 unur_free(gen);
4638 unur_distr_free(distr_localcopy);
4639 } while (0);
4640 }
4641
4642 if(TRUE) {
4643 printf("."); fflush(stdout);
4644 }
4645
4646 if(TRUE) {
4647 printf("."); fflush(stdout);
4648 }
4649
4650 if(TRUE) {
4651 printf("."); fflush(stdout);
4652 }
4653
4654 if(TRUE) {
4655 printf("."); fflush(stdout);
4656 }
4657
4658 if(TRUE) {
4659 printf("."); fflush(stdout);
4660 }
4661
4662 if(TRUE) {
4663 printf("."); fflush(stdout);
4664 }
4665
4666 if(TRUE) {
4667 printf("."); fflush(stdout);
4668 }
4669
4670 if(TRUE) {
4671 printf("."); fflush(stdout);
4672 }
4673
4674 if(TRUE) {
4675 printf("."); fflush(stdout);
4676 }
4677
4678 if(TRUE) {
4679 unur_reset_errno();
4680 do {
4681 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[39]);
4682 par = unur_cstd_new(distr_localcopy);
4683 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4684 gen = unur_init(par);
4685 if (gen) {
4686 unur_cstd_chg_truncated(gen,0.5,0.55);
4687 }
4688 rcode = run_validate_chi2(TESTLOG,0,gen,distr[39],'+');
4689 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4690 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4691 unur_free(gen);
4692 unur_distr_free(distr_localcopy);
4693 } while (0);
4694 }
4695
4696 if(TRUE) {
4697 unur_reset_errno();
4698 do {
4699 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[39]);
4700 { UNUR_DISTR *dg =NULL;
4701 par = unur_cstd_new(distr_localcopy);
4702 fpm[0] = 2.;
4703 fpm[1] = 5.;
4704 gen = unur_init(par);
4705 if (gen) {
4706 dg = unur_get_distr(gen);
4707 unur_distr_cont_set_pdfparams(dg,fpm,2);
4708 unur_reinit(gen); }
4709 }
4710 rcode = run_validate_chi2(TESTLOG,0,gen,distr[39],'+');
4711 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4712 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4713 unur_free(gen);
4714 unur_distr_free(distr_localcopy);
4715 } while (0);
4716 }
4717
4718 /* distribution [40] */
4719
4720 if(TRUE) {
4721 unur_reset_errno();
4722 do {
4723 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[40]);
4724 par = unur_cstd_new(distr_localcopy);
4725 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4726 gen = unur_init(par);
4727 rcode = run_validate_chi2(TESTLOG,0,gen,distr[40],'+');
4728 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4729 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4730 unur_free(gen);
4731 unur_distr_free(distr_localcopy);
4732 } while (0);
4733 }
4734
4735 if(TRUE) {
4736 printf("."); fflush(stdout);
4737 }
4738
4739 if(TRUE) {
4740 printf("."); fflush(stdout);
4741 }
4742
4743 if(TRUE) {
4744 printf("."); fflush(stdout);
4745 }
4746
4747 if(TRUE) {
4748 printf("."); fflush(stdout);
4749 }
4750
4751 if(TRUE) {
4752 printf("."); fflush(stdout);
4753 }
4754
4755 if(TRUE) {
4756 printf("."); fflush(stdout);
4757 }
4758
4759 if(TRUE) {
4760 printf("."); fflush(stdout);
4761 }
4762
4763 if(TRUE) {
4764 printf("."); fflush(stdout);
4765 }
4766
4767 if(TRUE) {
4768 printf("."); fflush(stdout);
4769 }
4770
4771 if(TRUE) {
4772 unur_reset_errno();
4773 do {
4774 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[40]);
4775 par = unur_cstd_new(distr_localcopy);
4776 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4777 gen = unur_init(par);
4778 if (gen) {
4779 unur_cstd_chg_truncated(gen,0.5,0.55);
4780 }
4781 rcode = run_validate_chi2(TESTLOG,0,gen,distr[40],'+');
4782 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4783 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4784 unur_free(gen);
4785 unur_distr_free(distr_localcopy);
4786 } while (0);
4787 }
4788
4789 if(TRUE) {
4790 unur_reset_errno();
4791 do {
4792 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[40]);
4793 { UNUR_DISTR *dg =NULL;
4794 par = unur_cstd_new(distr_localcopy);
4795 fpm[0] = 2.;
4796 fpm[1] = 5.;
4797 gen = unur_init(par);
4798 if (gen) {
4799 dg = unur_get_distr(gen);
4800 unur_distr_cont_set_pdfparams(dg,fpm,2);
4801 unur_reinit(gen); }
4802 }
4803 rcode = run_validate_chi2(TESTLOG,0,gen,distr[40],'+');
4804 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4805 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4806 unur_free(gen);
4807 unur_distr_free(distr_localcopy);
4808 } while (0);
4809 }
4810
4811 /* distribution [41] */
4812
4813 if(TRUE) {
4814 unur_reset_errno();
4815 do {
4816 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[41]);
4817 par = unur_cstd_new(distr_localcopy);
4818 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4819 gen = unur_init(par);
4820 rcode = run_validate_chi2(TESTLOG,0,gen,distr[41],'+');
4821 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4822 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4823 unur_free(gen);
4824 unur_distr_free(distr_localcopy);
4825 } while (0);
4826 }
4827
4828 if(TRUE) {
4829 printf("."); fflush(stdout);
4830 }
4831
4832 if(TRUE) {
4833 printf("."); fflush(stdout);
4834 }
4835
4836 if(TRUE) {
4837 printf("."); fflush(stdout);
4838 }
4839
4840 if(TRUE) {
4841 printf("."); fflush(stdout);
4842 }
4843
4844 if(TRUE) {
4845 printf("."); fflush(stdout);
4846 }
4847
4848 if(TRUE) {
4849 printf("."); fflush(stdout);
4850 }
4851
4852 if(TRUE) {
4853 printf("."); fflush(stdout);
4854 }
4855
4856 if(TRUE) {
4857 printf("."); fflush(stdout);
4858 }
4859
4860 if(TRUE) {
4861 printf("."); fflush(stdout);
4862 }
4863
4864 if(TRUE) {
4865 unur_reset_errno();
4866 do {
4867 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[41]);
4868 par = unur_cstd_new(distr_localcopy);
4869 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4870 gen = unur_init(par);
4871 if (gen) {
4872 unur_cstd_chg_truncated(gen,0.5,0.55);
4873 }
4874 rcode = run_validate_chi2(TESTLOG,0,gen,distr[41],'+');
4875 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4876 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4877 unur_free(gen);
4878 unur_distr_free(distr_localcopy);
4879 } while (0);
4880 }
4881
4882 if(TRUE) {
4883 unur_reset_errno();
4884 do {
4885 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[41]);
4886 { UNUR_DISTR *dg =NULL;
4887 par = unur_cstd_new(distr_localcopy);
4888 fpm[0] = 2.;
4889 fpm[1] = 5.;
4890 gen = unur_init(par);
4891 if (gen) {
4892 dg = unur_get_distr(gen);
4893 unur_distr_cont_set_pdfparams(dg,fpm,2);
4894 unur_reinit(gen); }
4895 }
4896 rcode = run_validate_chi2(TESTLOG,0,gen,distr[41],'+');
4897 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4898 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4899 unur_free(gen);
4900 unur_distr_free(distr_localcopy);
4901 } while (0);
4902 }
4903
4904 /* distribution [56] */
4905
4906 if(TRUE) {
4907 unur_reset_errno();
4908 do {
4909 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[56]);
4910 par = unur_cstd_new(distr_localcopy);
4911 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4912 gen = unur_init(par);
4913 rcode = run_validate_chi2(TESTLOG,0,gen,distr[56],'+');
4914 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4915 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4916 unur_free(gen);
4917 unur_distr_free(distr_localcopy);
4918 } while (0);
4919 }
4920
4921 if(TRUE) {
4922 printf("."); fflush(stdout);
4923 }
4924
4925 if(TRUE) {
4926 printf("."); fflush(stdout);
4927 }
4928
4929 if(TRUE) {
4930 printf("."); fflush(stdout);
4931 }
4932
4933 if(TRUE) {
4934 printf("."); fflush(stdout);
4935 }
4936
4937 if(TRUE) {
4938 printf("."); fflush(stdout);
4939 }
4940
4941 if(TRUE) {
4942 printf("."); fflush(stdout);
4943 }
4944
4945 if(TRUE) {
4946 printf("."); fflush(stdout);
4947 }
4948
4949 if(TRUE) {
4950 printf("."); fflush(stdout);
4951 }
4952
4953 if(TRUE) {
4954 printf("."); fflush(stdout);
4955 }
4956
4957 if(TRUE) {
4958 unur_reset_errno();
4959 do {
4960 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[56]);
4961 par = unur_cstd_new(distr_localcopy);
4962 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
4963 gen = unur_init(par);
4964 if (gen) {
4965 unur_cstd_chg_truncated(gen,0.5,0.55);
4966 }
4967 rcode = run_validate_chi2(TESTLOG,0,gen,distr[56],'+');
4968 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4969 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4970 unur_free(gen);
4971 unur_distr_free(distr_localcopy);
4972 } while (0);
4973 }
4974
4975 if(TRUE) {
4976 unur_reset_errno();
4977 do {
4978 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[56]);
4979 { UNUR_DISTR *dg =NULL;
4980 par = unur_cstd_new(distr_localcopy);
4981 fpm[0] = 2.;
4982 fpm[1] = 5.;
4983 gen = unur_init(par);
4984 if (gen) {
4985 dg = unur_get_distr(gen);
4986 unur_distr_cont_set_pdfparams(dg,fpm,2);
4987 unur_reinit(gen); }
4988 }
4989 rcode = run_validate_chi2(TESTLOG,0,gen,distr[56],'+');
4990 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
4991 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
4992 unur_free(gen);
4993 unur_distr_free(distr_localcopy);
4994 } while (0);
4995 }
4996
4997 /* distribution [57] */
4998
4999 if(TRUE) {
5000 unur_reset_errno();
5001 do {
5002 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[57]);
5003 par = unur_cstd_new(distr_localcopy);
5004 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5005 gen = unur_init(par);
5006 rcode = run_validate_chi2(TESTLOG,0,gen,distr[57],'+');
5007 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5008 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5009 unur_free(gen);
5010 unur_distr_free(distr_localcopy);
5011 } while (0);
5012 }
5013
5014 if(TRUE) {
5015 printf("."); fflush(stdout);
5016 }
5017
5018 if(TRUE) {
5019 printf("."); fflush(stdout);
5020 }
5021
5022 if(TRUE) {
5023 printf("."); fflush(stdout);
5024 }
5025
5026 if(TRUE) {
5027 printf("."); fflush(stdout);
5028 }
5029
5030 if(TRUE) {
5031 printf("."); fflush(stdout);
5032 }
5033
5034 if(TRUE) {
5035 printf("."); fflush(stdout);
5036 }
5037
5038 if(TRUE) {
5039 printf("."); fflush(stdout);
5040 }
5041
5042 if(TRUE) {
5043 printf("."); fflush(stdout);
5044 }
5045
5046 if(TRUE) {
5047 printf("."); fflush(stdout);
5048 }
5049
5050 if(TRUE) {
5051 unur_reset_errno();
5052 do {
5053 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[57]);
5054 par = unur_cstd_new(distr_localcopy);
5055 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5056 gen = unur_init(par);
5057 if (gen) {
5058 unur_cstd_chg_truncated(gen,0.5,0.55);
5059 }
5060 rcode = run_validate_chi2(TESTLOG,0,gen,distr[57],'+');
5061 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5062 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5063 unur_free(gen);
5064 unur_distr_free(distr_localcopy);
5065 } while (0);
5066 }
5067
5068 if(TRUE) {
5069 unur_reset_errno();
5070 do {
5071 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[57]);
5072 { UNUR_DISTR *dg =NULL;
5073 par = unur_cstd_new(distr_localcopy);
5074 fpm[0] = 2.;
5075 fpm[1] = 5.;
5076 gen = unur_init(par);
5077 if (gen) {
5078 dg = unur_get_distr(gen);
5079 unur_distr_cont_set_pdfparams(dg,fpm,2);
5080 unur_reinit(gen); }
5081 }
5082 rcode = run_validate_chi2(TESTLOG,0,gen,distr[57],'+');
5083 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5084 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5085 unur_free(gen);
5086 unur_distr_free(distr_localcopy);
5087 } while (0);
5088 }
5089
5090 /* distribution [58] */
5091
5092 if(TRUE) {
5093 unur_reset_errno();
5094 do {
5095 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[58]);
5096 par = unur_cstd_new(distr_localcopy);
5097 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5098 gen = unur_init(par);
5099 rcode = run_validate_chi2(TESTLOG,0,gen,distr[58],'+');
5100 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5101 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5102 unur_free(gen);
5103 unur_distr_free(distr_localcopy);
5104 } while (0);
5105 }
5106
5107 if(TRUE) {
5108 printf("."); fflush(stdout);
5109 }
5110
5111 if(TRUE) {
5112 printf("."); fflush(stdout);
5113 }
5114
5115 if(TRUE) {
5116 printf("."); fflush(stdout);
5117 }
5118
5119 if(TRUE) {
5120 printf("."); fflush(stdout);
5121 }
5122
5123 if(TRUE) {
5124 printf("."); fflush(stdout);
5125 }
5126
5127 if(TRUE) {
5128 printf("."); fflush(stdout);
5129 }
5130
5131 if(TRUE) {
5132 printf("."); fflush(stdout);
5133 }
5134
5135 if(TRUE) {
5136 printf("."); fflush(stdout);
5137 }
5138
5139 if(TRUE) {
5140 printf("."); fflush(stdout);
5141 }
5142
5143 if(TRUE) {
5144 unur_reset_errno();
5145 do {
5146 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[58]);
5147 par = unur_cstd_new(distr_localcopy);
5148 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5149 gen = unur_init(par);
5150 if (gen) {
5151 unur_cstd_chg_truncated(gen,0.5,0.55);
5152 }
5153 rcode = run_validate_chi2(TESTLOG,0,gen,distr[58],'+');
5154 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5155 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5156 unur_free(gen);
5157 unur_distr_free(distr_localcopy);
5158 } while (0);
5159 }
5160
5161 if(TRUE) {
5162 unur_reset_errno();
5163 do {
5164 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[58]);
5165 { UNUR_DISTR *dg =NULL;
5166 par = unur_cstd_new(distr_localcopy);
5167 fpm[0] = 2.;
5168 fpm[1] = 5.;
5169 gen = unur_init(par);
5170 if (gen) {
5171 dg = unur_get_distr(gen);
5172 unur_distr_cont_set_pdfparams(dg,fpm,2);
5173 unur_reinit(gen); }
5174 }
5175 rcode = run_validate_chi2(TESTLOG,0,gen,distr[58],'+');
5176 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5177 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5178 unur_free(gen);
5179 unur_distr_free(distr_localcopy);
5180 } while (0);
5181 }
5182
5183 /* distribution [59] */
5184
5185 if(TRUE) {
5186 unur_reset_errno();
5187 do {
5188 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[59]);
5189 par = unur_cstd_new(distr_localcopy);
5190 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5191 gen = unur_init(par);
5192 rcode = run_validate_chi2(TESTLOG,0,gen,distr[59],'+');
5193 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5194 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5195 unur_free(gen);
5196 unur_distr_free(distr_localcopy);
5197 } while (0);
5198 }
5199
5200 if(TRUE) {
5201 printf("."); fflush(stdout);
5202 }
5203
5204 if(TRUE) {
5205 printf("."); fflush(stdout);
5206 }
5207
5208 if(TRUE) {
5209 printf("."); fflush(stdout);
5210 }
5211
5212 if(TRUE) {
5213 printf("."); fflush(stdout);
5214 }
5215
5216 if(TRUE) {
5217 printf("."); fflush(stdout);
5218 }
5219
5220 if(TRUE) {
5221 printf("."); fflush(stdout);
5222 }
5223
5224 if(TRUE) {
5225 printf("."); fflush(stdout);
5226 }
5227
5228 if(TRUE) {
5229 printf("."); fflush(stdout);
5230 }
5231
5232 if(TRUE) {
5233 printf("."); fflush(stdout);
5234 }
5235
5236 if(TRUE) {
5237 unur_reset_errno();
5238 do {
5239 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[59]);
5240 par = unur_cstd_new(distr_localcopy);
5241 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5242 gen = unur_init(par);
5243 if (gen) {
5244 unur_cstd_chg_truncated(gen,0.5,0.55);
5245 }
5246 rcode = run_validate_chi2(TESTLOG,0,gen,distr[59],'+');
5247 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5248 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5249 unur_free(gen);
5250 unur_distr_free(distr_localcopy);
5251 } while (0);
5252 }
5253
5254 if(TRUE) {
5255 unur_reset_errno();
5256 do {
5257 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[59]);
5258 { UNUR_DISTR *dg =NULL;
5259 par = unur_cstd_new(distr_localcopy);
5260 fpm[0] = 2.;
5261 fpm[1] = 5.;
5262 gen = unur_init(par);
5263 if (gen) {
5264 dg = unur_get_distr(gen);
5265 unur_distr_cont_set_pdfparams(dg,fpm,2);
5266 unur_reinit(gen); }
5267 }
5268 rcode = run_validate_chi2(TESTLOG,0,gen,distr[59],'+');
5269 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5270 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5271 unur_free(gen);
5272 unur_distr_free(distr_localcopy);
5273 } while (0);
5274 }
5275
5276 /* distribution [17] */
5277
5278 if(TRUE) {
5279 unur_reset_errno();
5280 do {
5281 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
5282 par = unur_cstd_new(distr_localcopy);
5283 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5284 gen = unur_init(par);
5285 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'/');
5286 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5287 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5288 unur_free(gen);
5289 unur_distr_free(distr_localcopy);
5290 } while (0);
5291 }
5292
5293 if(TRUE) {
5294 unur_reset_errno();
5295 do {
5296 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
5297 par = unur_cstd_new(distr_localcopy);
5298 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5299 gen = unur_init(par);
5300 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'+');
5301 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5302 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5303 unur_free(gen);
5304 unur_distr_free(distr_localcopy);
5305 } while (0);
5306 }
5307
5308 if(TRUE) {
5309 unur_reset_errno();
5310 do {
5311 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
5312 par = unur_cstd_new(distr_localcopy);
5313 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5314 gen = unur_init(par);
5315 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'+');
5316 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5317 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5318 unur_free(gen);
5319 unur_distr_free(distr_localcopy);
5320 } while (0);
5321 }
5322
5323 if(TRUE) {
5324 unur_reset_errno();
5325 do {
5326 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
5327 par = unur_cstd_new(distr_localcopy);
5328 if (unur_cstd_set_variant(par,3)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5329 gen = unur_init(par);
5330 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'+');
5331 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5332 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5333 unur_free(gen);
5334 unur_distr_free(distr_localcopy);
5335 } while (0);
5336 }
5337
5338 if(TRUE) {
5339 unur_reset_errno();
5340 do {
5341 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
5342 par = unur_cstd_new(distr_localcopy);
5343 if (unur_cstd_set_variant(par,4)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5344 gen = unur_init(par);
5345 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'+');
5346 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5347 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5348 unur_free(gen);
5349 unur_distr_free(distr_localcopy);
5350 } while (0);
5351 }
5352
5353 if(TRUE) {
5354 unur_reset_errno();
5355 do {
5356 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
5357 par = unur_cstd_new(distr_localcopy);
5358 if (unur_cstd_set_variant(par,5)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5359 gen = unur_init(par);
5360 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'+');
5361 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5362 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5363 unur_free(gen);
5364 unur_distr_free(distr_localcopy);
5365 } while (0);
5366 }
5367
5368 if(TRUE) {
5369 unur_reset_errno();
5370 do {
5371 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
5372 par = unur_cstd_new(distr_localcopy);
5373 if (unur_cstd_set_variant(par,6)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5374 gen = unur_init(par);
5375 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'+');
5376 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5377 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5378 unur_free(gen);
5379 unur_distr_free(distr_localcopy);
5380 } while (0);
5381 }
5382
5383 if(TRUE) {
5384 unur_reset_errno();
5385 do {
5386 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
5387 par = unur_cstd_new(distr_localcopy);
5388 if (unur_cstd_set_variant(par,7)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5389 gen = unur_init(par);
5390 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'+');
5391 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5392 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5393 unur_free(gen);
5394 unur_distr_free(distr_localcopy);
5395 } while (0);
5396 }
5397
5398 if(TRUE) {
5399 printf("."); fflush(stdout);
5400 }
5401
5402 if(TRUE) {
5403 printf("."); fflush(stdout);
5404 }
5405
5406 if(TRUE) {
5407 unur_reset_errno();
5408 do {
5409 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
5410 par = unur_cstd_new(distr_localcopy);
5411 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5412 gen = unur_init(par);
5413 if (gen) {
5414 unur_cstd_chg_truncated(gen,0.5,0.55);
5415 }
5416 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'/');
5417 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5418 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5419 unur_free(gen);
5420 unur_distr_free(distr_localcopy);
5421 } while (0);
5422 }
5423
5424 if(TRUE) {
5425 unur_reset_errno();
5426 do {
5427 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[17]);
5428 { UNUR_DISTR *dg =NULL;
5429 par = unur_cstd_new(distr_localcopy);
5430 fpm[0] = 2.;
5431 fpm[1] = 5.;
5432 gen = unur_init(par);
5433 if (gen) {
5434 dg = unur_get_distr(gen);
5435 unur_distr_cont_set_pdfparams(dg,fpm,2);
5436 unur_reinit(gen); }
5437 }
5438 rcode = run_validate_chi2(TESTLOG,0,gen,distr[17],'+');
5439 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5440 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5441 unur_free(gen);
5442 unur_distr_free(distr_localcopy);
5443 } while (0);
5444 }
5445
5446 /* distribution [18] */
5447
5448 if(fullcheck) {
5449 unur_reset_errno();
5450 do {
5451 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
5452 par = unur_cstd_new(distr_localcopy);
5453 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5454 gen = unur_init(par);
5455 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'/');
5456 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5457 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5458 unur_free(gen);
5459 unur_distr_free(distr_localcopy);
5460 } while (0);
5461 }
5462
5463 if(fullcheck) {
5464 unur_reset_errno();
5465 do {
5466 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
5467 par = unur_cstd_new(distr_localcopy);
5468 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5469 gen = unur_init(par);
5470 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'+');
5471 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5472 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5473 unur_free(gen);
5474 unur_distr_free(distr_localcopy);
5475 } while (0);
5476 }
5477
5478 if(fullcheck) {
5479 unur_reset_errno();
5480 do {
5481 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
5482 par = unur_cstd_new(distr_localcopy);
5483 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5484 gen = unur_init(par);
5485 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'+');
5486 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5487 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5488 unur_free(gen);
5489 unur_distr_free(distr_localcopy);
5490 } while (0);
5491 }
5492
5493 if(fullcheck) {
5494 unur_reset_errno();
5495 do {
5496 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
5497 par = unur_cstd_new(distr_localcopy);
5498 if (unur_cstd_set_variant(par,3)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5499 gen = unur_init(par);
5500 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'+');
5501 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5502 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5503 unur_free(gen);
5504 unur_distr_free(distr_localcopy);
5505 } while (0);
5506 }
5507
5508 if(fullcheck) {
5509 unur_reset_errno();
5510 do {
5511 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
5512 par = unur_cstd_new(distr_localcopy);
5513 if (unur_cstd_set_variant(par,4)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5514 gen = unur_init(par);
5515 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'+');
5516 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5517 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5518 unur_free(gen);
5519 unur_distr_free(distr_localcopy);
5520 } while (0);
5521 }
5522
5523 if(fullcheck) {
5524 unur_reset_errno();
5525 do {
5526 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
5527 par = unur_cstd_new(distr_localcopy);
5528 if (unur_cstd_set_variant(par,5)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5529 gen = unur_init(par);
5530 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'+');
5531 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5532 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5533 unur_free(gen);
5534 unur_distr_free(distr_localcopy);
5535 } while (0);
5536 }
5537
5538 if(fullcheck) {
5539 unur_reset_errno();
5540 do {
5541 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
5542 par = unur_cstd_new(distr_localcopy);
5543 if (unur_cstd_set_variant(par,6)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5544 gen = unur_init(par);
5545 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'+');
5546 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5547 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5548 unur_free(gen);
5549 unur_distr_free(distr_localcopy);
5550 } while (0);
5551 }
5552
5553 if(fullcheck) {
5554 unur_reset_errno();
5555 do {
5556 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
5557 par = unur_cstd_new(distr_localcopy);
5558 if (unur_cstd_set_variant(par,7)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5559 gen = unur_init(par);
5560 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'+');
5561 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5562 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5563 unur_free(gen);
5564 unur_distr_free(distr_localcopy);
5565 } while (0);
5566 }
5567
5568 if(fullcheck) {
5569 printf("."); fflush(stdout);
5570 }
5571
5572 if(fullcheck) {
5573 printf("."); fflush(stdout);
5574 }
5575
5576 if(fullcheck) {
5577 printf("."); fflush(stdout);
5578 }
5579
5580 if(fullcheck) {
5581 unur_reset_errno();
5582 do {
5583 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[18]);
5584 { UNUR_DISTR *dg =NULL;
5585 par = unur_cstd_new(distr_localcopy);
5586 fpm[0] = 2.;
5587 fpm[1] = 5.;
5588 gen = unur_init(par);
5589 if (gen) {
5590 dg = unur_get_distr(gen);
5591 unur_distr_cont_set_pdfparams(dg,fpm,2);
5592 unur_reinit(gen); }
5593 }
5594 rcode = run_validate_chi2(TESTLOG,0,gen,distr[18],'+');
5595 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5596 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5597 unur_free(gen);
5598 unur_distr_free(distr_localcopy);
5599 } while (0);
5600 }
5601
5602 /* distribution [19] */
5603
5604 if(TRUE) {
5605 unur_reset_errno();
5606 do {
5607 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
5608 par = unur_cstd_new(distr_localcopy);
5609 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5610 gen = unur_init(par);
5611 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'/');
5612 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5613 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5614 unur_free(gen);
5615 unur_distr_free(distr_localcopy);
5616 } while (0);
5617 }
5618
5619 if(TRUE) {
5620 unur_reset_errno();
5621 do {
5622 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
5623 par = unur_cstd_new(distr_localcopy);
5624 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5625 gen = unur_init(par);
5626 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'+');
5627 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5628 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5629 unur_free(gen);
5630 unur_distr_free(distr_localcopy);
5631 } while (0);
5632 }
5633
5634 if(TRUE) {
5635 unur_reset_errno();
5636 do {
5637 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
5638 par = unur_cstd_new(distr_localcopy);
5639 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5640 gen = unur_init(par);
5641 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'+');
5642 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5643 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5644 unur_free(gen);
5645 unur_distr_free(distr_localcopy);
5646 } while (0);
5647 }
5648
5649 if(TRUE) {
5650 unur_reset_errno();
5651 do {
5652 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
5653 par = unur_cstd_new(distr_localcopy);
5654 if (unur_cstd_set_variant(par,3)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5655 gen = unur_init(par);
5656 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'+');
5657 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5658 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5659 unur_free(gen);
5660 unur_distr_free(distr_localcopy);
5661 } while (0);
5662 }
5663
5664 if(TRUE) {
5665 unur_reset_errno();
5666 do {
5667 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
5668 par = unur_cstd_new(distr_localcopy);
5669 if (unur_cstd_set_variant(par,4)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5670 gen = unur_init(par);
5671 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'+');
5672 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5673 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5674 unur_free(gen);
5675 unur_distr_free(distr_localcopy);
5676 } while (0);
5677 }
5678
5679 if(TRUE) {
5680 unur_reset_errno();
5681 do {
5682 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
5683 par = unur_cstd_new(distr_localcopy);
5684 if (unur_cstd_set_variant(par,5)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5685 gen = unur_init(par);
5686 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'+');
5687 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5688 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5689 unur_free(gen);
5690 unur_distr_free(distr_localcopy);
5691 } while (0);
5692 }
5693
5694 if(TRUE) {
5695 unur_reset_errno();
5696 do {
5697 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
5698 par = unur_cstd_new(distr_localcopy);
5699 if (unur_cstd_set_variant(par,6)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5700 gen = unur_init(par);
5701 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'+');
5702 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5703 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5704 unur_free(gen);
5705 unur_distr_free(distr_localcopy);
5706 } while (0);
5707 }
5708
5709 if(TRUE) {
5710 unur_reset_errno();
5711 do {
5712 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
5713 par = unur_cstd_new(distr_localcopy);
5714 if (unur_cstd_set_variant(par,7)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5715 gen = unur_init(par);
5716 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'+');
5717 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5718 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5719 unur_free(gen);
5720 unur_distr_free(distr_localcopy);
5721 } while (0);
5722 }
5723
5724 if(TRUE) {
5725 printf("."); fflush(stdout);
5726 }
5727
5728 if(TRUE) {
5729 printf("."); fflush(stdout);
5730 }
5731
5732 if(TRUE) {
5733 unur_reset_errno();
5734 do {
5735 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
5736 par = unur_cstd_new(distr_localcopy);
5737 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5738 gen = unur_init(par);
5739 if (gen) {
5740 unur_cstd_chg_truncated(gen,0.5,0.55);
5741 }
5742 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'/');
5743 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5744 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5745 unur_free(gen);
5746 unur_distr_free(distr_localcopy);
5747 } while (0);
5748 }
5749
5750 if(TRUE) {
5751 unur_reset_errno();
5752 do {
5753 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[19]);
5754 { UNUR_DISTR *dg =NULL;
5755 par = unur_cstd_new(distr_localcopy);
5756 fpm[0] = 2.;
5757 fpm[1] = 5.;
5758 gen = unur_init(par);
5759 if (gen) {
5760 dg = unur_get_distr(gen);
5761 unur_distr_cont_set_pdfparams(dg,fpm,2);
5762 unur_reinit(gen); }
5763 }
5764 rcode = run_validate_chi2(TESTLOG,0,gen,distr[19],'+');
5765 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5766 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5767 unur_free(gen);
5768 unur_distr_free(distr_localcopy);
5769 } while (0);
5770 }
5771
5772 /* distribution [52] */
5773
5774 if(TRUE) {
5775 unur_reset_errno();
5776 do {
5777 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[52]);
5778 par = unur_cstd_new(distr_localcopy);
5779 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5780 gen = unur_init(par);
5781 rcode = run_validate_chi2(TESTLOG,0,gen,distr[52],'+');
5782 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5783 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5784 unur_free(gen);
5785 unur_distr_free(distr_localcopy);
5786 } while (0);
5787 }
5788
5789 if(TRUE) {
5790 printf("."); fflush(stdout);
5791 }
5792
5793 if(TRUE) {
5794 printf("."); fflush(stdout);
5795 }
5796
5797 if(TRUE) {
5798 printf("."); fflush(stdout);
5799 }
5800
5801 if(TRUE) {
5802 printf("."); fflush(stdout);
5803 }
5804
5805 if(TRUE) {
5806 printf("."); fflush(stdout);
5807 }
5808
5809 if(TRUE) {
5810 printf("."); fflush(stdout);
5811 }
5812
5813 if(TRUE) {
5814 printf("."); fflush(stdout);
5815 }
5816
5817 if(TRUE) {
5818 printf("."); fflush(stdout);
5819 }
5820
5821 if(TRUE) {
5822 printf("."); fflush(stdout);
5823 }
5824
5825 if(TRUE) {
5826 printf("."); fflush(stdout);
5827 }
5828
5829 if(TRUE) {
5830 unur_reset_errno();
5831 do {
5832 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[52]);
5833 { UNUR_DISTR *dg =NULL;
5834 par = unur_cstd_new(distr_localcopy);
5835 fpm[0] = 2.;
5836 fpm[1] = 5.;
5837 gen = unur_init(par);
5838 if (gen) {
5839 dg = unur_get_distr(gen);
5840 unur_distr_cont_set_pdfparams(dg,fpm,2);
5841 unur_reinit(gen); }
5842 }
5843 rcode = run_validate_chi2(TESTLOG,0,gen,distr[52],'+');
5844 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5845 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5846 unur_free(gen);
5847 unur_distr_free(distr_localcopy);
5848 } while (0);
5849 }
5850
5851 /* distribution [53] */
5852
5853 if(TRUE) {
5854 unur_reset_errno();
5855 do {
5856 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[53]);
5857 par = unur_cstd_new(distr_localcopy);
5858 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5859 gen = unur_init(par);
5860 rcode = run_validate_chi2(TESTLOG,0,gen,distr[53],'+');
5861 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5862 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5863 unur_free(gen);
5864 unur_distr_free(distr_localcopy);
5865 } while (0);
5866 }
5867
5868 if(TRUE) {
5869 printf("."); fflush(stdout);
5870 }
5871
5872 if(TRUE) {
5873 printf("."); fflush(stdout);
5874 }
5875
5876 if(TRUE) {
5877 printf("."); fflush(stdout);
5878 }
5879
5880 if(TRUE) {
5881 printf("."); fflush(stdout);
5882 }
5883
5884 if(TRUE) {
5885 printf("."); fflush(stdout);
5886 }
5887
5888 if(TRUE) {
5889 printf("."); fflush(stdout);
5890 }
5891
5892 if(TRUE) {
5893 printf("."); fflush(stdout);
5894 }
5895
5896 if(TRUE) {
5897 printf("."); fflush(stdout);
5898 }
5899
5900 if(TRUE) {
5901 printf("."); fflush(stdout);
5902 }
5903
5904 if(TRUE) {
5905 printf("."); fflush(stdout);
5906 }
5907
5908 if(TRUE) {
5909 unur_reset_errno();
5910 do {
5911 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[53]);
5912 { UNUR_DISTR *dg =NULL;
5913 par = unur_cstd_new(distr_localcopy);
5914 fpm[0] = 2.;
5915 fpm[1] = 5.;
5916 gen = unur_init(par);
5917 if (gen) {
5918 dg = unur_get_distr(gen);
5919 unur_distr_cont_set_pdfparams(dg,fpm,2);
5920 unur_reinit(gen); }
5921 }
5922 rcode = run_validate_chi2(TESTLOG,0,gen,distr[53],'+');
5923 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5924 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5925 unur_free(gen);
5926 unur_distr_free(distr_localcopy);
5927 } while (0);
5928 }
5929
5930 /* distribution [54] */
5931
5932 if(TRUE) {
5933 unur_reset_errno();
5934 do {
5935 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[54]);
5936 par = unur_cstd_new(distr_localcopy);
5937 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
5938 gen = unur_init(par);
5939 rcode = run_validate_chi2(TESTLOG,0,gen,distr[54],'+');
5940 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
5941 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
5942 unur_free(gen);
5943 unur_distr_free(distr_localcopy);
5944 } while (0);
5945 }
5946
5947 if(TRUE) {
5948 printf("."); fflush(stdout);
5949 }
5950
5951 if(TRUE) {
5952 printf("."); fflush(stdout);
5953 }
5954
5955 if(TRUE) {
5956 printf("."); fflush(stdout);
5957 }
5958
5959 if(TRUE) {
5960 printf("."); fflush(stdout);
5961 }
5962
5963 if(TRUE) {
5964 printf("."); fflush(stdout);
5965 }
5966
5967 if(TRUE) {
5968 printf("."); fflush(stdout);
5969 }
5970
5971 if(TRUE) {
5972 printf("."); fflush(stdout);
5973 }
5974
5975 if(TRUE) {
5976 printf("."); fflush(stdout);
5977 }
5978
5979 if(TRUE) {
5980 printf("."); fflush(stdout);
5981 }
5982
5983 if(TRUE) {
5984 printf("."); fflush(stdout);
5985 }
5986
5987 if(TRUE) {
5988 unur_reset_errno();
5989 do {
5990 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[54]);
5991 { UNUR_DISTR *dg =NULL;
5992 par = unur_cstd_new(distr_localcopy);
5993 fpm[0] = 2.;
5994 fpm[1] = 5.;
5995 gen = unur_init(par);
5996 if (gen) {
5997 dg = unur_get_distr(gen);
5998 unur_distr_cont_set_pdfparams(dg,fpm,2);
5999 unur_reinit(gen); }
6000 }
6001 rcode = run_validate_chi2(TESTLOG,0,gen,distr[54],'+');
6002 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6003 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6004 unur_free(gen);
6005 unur_distr_free(distr_localcopy);
6006 } while (0);
6007 }
6008
6009 /* distribution [55] */
6010
6011 if(TRUE) {
6012 unur_reset_errno();
6013 do {
6014 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[55]);
6015 par = unur_cstd_new(distr_localcopy);
6016 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6017 gen = unur_init(par);
6018 rcode = run_validate_chi2(TESTLOG,0,gen,distr[55],'+');
6019 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6020 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6021 unur_free(gen);
6022 unur_distr_free(distr_localcopy);
6023 } while (0);
6024 }
6025
6026 if(TRUE) {
6027 printf("."); fflush(stdout);
6028 }
6029
6030 if(TRUE) {
6031 printf("."); fflush(stdout);
6032 }
6033
6034 if(TRUE) {
6035 printf("."); fflush(stdout);
6036 }
6037
6038 if(TRUE) {
6039 printf("."); fflush(stdout);
6040 }
6041
6042 if(TRUE) {
6043 printf("."); fflush(stdout);
6044 }
6045
6046 if(TRUE) {
6047 printf("."); fflush(stdout);
6048 }
6049
6050 if(TRUE) {
6051 printf("."); fflush(stdout);
6052 }
6053
6054 if(TRUE) {
6055 printf("."); fflush(stdout);
6056 }
6057
6058 if(TRUE) {
6059 printf("."); fflush(stdout);
6060 }
6061
6062 if(TRUE) {
6063 unur_reset_errno();
6064 do {
6065 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[55]);
6066 par = unur_cstd_new(distr_localcopy);
6067 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6068 gen = unur_init(par);
6069 if (gen) {
6070 unur_cstd_chg_truncated(gen,0.5,0.55);
6071 }
6072 rcode = run_validate_chi2(TESTLOG,0,gen,distr[55],'+');
6073 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6074 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6075 unur_free(gen);
6076 unur_distr_free(distr_localcopy);
6077 } while (0);
6078 }
6079
6080 if(TRUE) {
6081 unur_reset_errno();
6082 do {
6083 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[55]);
6084 { UNUR_DISTR *dg =NULL;
6085 par = unur_cstd_new(distr_localcopy);
6086 fpm[0] = 2.;
6087 fpm[1] = 5.;
6088 gen = unur_init(par);
6089 if (gen) {
6090 dg = unur_get_distr(gen);
6091 unur_distr_cont_set_pdfparams(dg,fpm,2);
6092 unur_reinit(gen); }
6093 }
6094 rcode = run_validate_chi2(TESTLOG,0,gen,distr[55],'+');
6095 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6096 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6097 unur_free(gen);
6098 unur_distr_free(distr_localcopy);
6099 } while (0);
6100 }
6101
6102 /* distribution [42] */
6103
6104 if(TRUE) {
6105 printf("."); fflush(stdout);
6106 }
6107
6108 if(TRUE) {
6109 unur_reset_errno();
6110 do {
6111 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[42]);
6112 par = unur_cstd_new(distr_localcopy);
6113 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6114 gen = unur_init(par);
6115 rcode = run_validate_chi2(TESTLOG,0,gen,distr[42],'-');
6116 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6117 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6118 unur_free(gen);
6119 unur_distr_free(distr_localcopy);
6120 } while (0);
6121 }
6122
6123 if(TRUE) {
6124 printf("."); fflush(stdout);
6125 }
6126
6127 if(TRUE) {
6128 printf("."); fflush(stdout);
6129 }
6130
6131 if(TRUE) {
6132 printf("."); fflush(stdout);
6133 }
6134
6135 if(TRUE) {
6136 printf("."); fflush(stdout);
6137 }
6138
6139 if(TRUE) {
6140 printf("."); fflush(stdout);
6141 }
6142
6143 if(TRUE) {
6144 printf("."); fflush(stdout);
6145 }
6146
6147 if(TRUE) {
6148 printf("."); fflush(stdout);
6149 }
6150
6151 if(TRUE) {
6152 printf("."); fflush(stdout);
6153 }
6154
6155 if(TRUE) {
6156 printf("."); fflush(stdout);
6157 }
6158
6159 if(TRUE) {
6160 printf("."); fflush(stdout);
6161 }
6162
6163 /* distribution [43] */
6164
6165 if(TRUE) {
6166 printf("."); fflush(stdout);
6167 }
6168
6169 if(TRUE) {
6170 unur_reset_errno();
6171 do {
6172 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[43]);
6173 par = unur_cstd_new(distr_localcopy);
6174 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6175 gen = unur_init(par);
6176 rcode = run_validate_chi2(TESTLOG,0,gen,distr[43],'+');
6177 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6178 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6179 unur_free(gen);
6180 unur_distr_free(distr_localcopy);
6181 } while (0);
6182 }
6183
6184 if(TRUE) {
6185 printf("."); fflush(stdout);
6186 }
6187
6188 if(TRUE) {
6189 printf("."); fflush(stdout);
6190 }
6191
6192 if(TRUE) {
6193 printf("."); fflush(stdout);
6194 }
6195
6196 if(TRUE) {
6197 printf("."); fflush(stdout);
6198 }
6199
6200 if(TRUE) {
6201 printf("."); fflush(stdout);
6202 }
6203
6204 if(TRUE) {
6205 printf("."); fflush(stdout);
6206 }
6207
6208 if(TRUE) {
6209 printf("."); fflush(stdout);
6210 }
6211
6212 if(TRUE) {
6213 printf("."); fflush(stdout);
6214 }
6215
6216 if(TRUE) {
6217 printf("."); fflush(stdout);
6218 }
6219
6220 if(TRUE) {
6221 unur_reset_errno();
6222 do {
6223 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[43]);
6224 { UNUR_DISTR *dg =NULL;
6225 par = unur_cstd_new(distr_localcopy);
6226 fpm[0] = 2.;
6227 fpm[1] = 5.;
6228 gen = unur_init(par);
6229 if (gen) {
6230 dg = unur_get_distr(gen);
6231 unur_distr_cont_set_pdfparams(dg,fpm,2);
6232 unur_reinit(gen); }
6233 }
6234 rcode = run_validate_chi2(TESTLOG,0,gen,distr[43],'+');
6235 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6236 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6237 unur_free(gen);
6238 unur_distr_free(distr_localcopy);
6239 } while (0);
6240 }
6241
6242 /* distribution [44] */
6243
6244 if(fullcheck) {
6245 printf("."); fflush(stdout);
6246 }
6247
6248 if(fullcheck) {
6249 unur_reset_errno();
6250 do {
6251 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[44]);
6252 par = unur_cstd_new(distr_localcopy);
6253 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6254 gen = unur_init(par);
6255 rcode = run_validate_chi2(TESTLOG,0,gen,distr[44],'+');
6256 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6257 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6258 unur_free(gen);
6259 unur_distr_free(distr_localcopy);
6260 } while (0);
6261 }
6262
6263 if(fullcheck) {
6264 printf("."); fflush(stdout);
6265 }
6266
6267 if(fullcheck) {
6268 printf("."); fflush(stdout);
6269 }
6270
6271 if(fullcheck) {
6272 printf("."); fflush(stdout);
6273 }
6274
6275 if(fullcheck) {
6276 printf("."); fflush(stdout);
6277 }
6278
6279 if(fullcheck) {
6280 printf("."); fflush(stdout);
6281 }
6282
6283 if(fullcheck) {
6284 printf("."); fflush(stdout);
6285 }
6286
6287 if(fullcheck) {
6288 printf("."); fflush(stdout);
6289 }
6290
6291 if(fullcheck) {
6292 printf("."); fflush(stdout);
6293 }
6294
6295 if(fullcheck) {
6296 printf("."); fflush(stdout);
6297 }
6298
6299 if(fullcheck) {
6300 printf("."); fflush(stdout);
6301 }
6302
6303 /* distribution [45] */
6304
6305 if(TRUE) {
6306 printf("."); fflush(stdout);
6307 }
6308
6309 if(TRUE) {
6310 unur_reset_errno();
6311 do {
6312 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[45]);
6313 par = unur_cstd_new(distr_localcopy);
6314 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6315 gen = unur_init(par);
6316 rcode = run_validate_chi2(TESTLOG,0,gen,distr[45],'+');
6317 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6318 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6319 unur_free(gen);
6320 unur_distr_free(distr_localcopy);
6321 } while (0);
6322 }
6323
6324 if(TRUE) {
6325 printf("."); fflush(stdout);
6326 }
6327
6328 if(TRUE) {
6329 printf("."); fflush(stdout);
6330 }
6331
6332 if(TRUE) {
6333 printf("."); fflush(stdout);
6334 }
6335
6336 if(TRUE) {
6337 printf("."); fflush(stdout);
6338 }
6339
6340 if(TRUE) {
6341 printf("."); fflush(stdout);
6342 }
6343
6344 if(TRUE) {
6345 printf("."); fflush(stdout);
6346 }
6347
6348 if(TRUE) {
6349 printf("."); fflush(stdout);
6350 }
6351
6352 if(TRUE) {
6353 printf("."); fflush(stdout);
6354 }
6355
6356 if(TRUE) {
6357 printf("."); fflush(stdout);
6358 }
6359
6360 if(TRUE) {
6361 printf("."); fflush(stdout);
6362 }
6363
6364 /* distribution [46] */
6365
6366 if(TRUE) {
6367 unur_reset_errno();
6368 do {
6369 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[46]);
6370 par = unur_cstd_new(distr_localcopy);
6371 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6372 gen = unur_init(par);
6373 rcode = run_validate_chi2(TESTLOG,0,gen,distr[46],'+');
6374 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6375 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6376 unur_free(gen);
6377 unur_distr_free(distr_localcopy);
6378 } while (0);
6379 }
6380
6381 if(TRUE) {
6382 printf("."); fflush(stdout);
6383 }
6384
6385 if(TRUE) {
6386 printf("."); fflush(stdout);
6387 }
6388
6389 if(TRUE) {
6390 printf("."); fflush(stdout);
6391 }
6392
6393 if(TRUE) {
6394 printf("."); fflush(stdout);
6395 }
6396
6397 if(TRUE) {
6398 printf("."); fflush(stdout);
6399 }
6400
6401 if(TRUE) {
6402 printf("."); fflush(stdout);
6403 }
6404
6405 if(TRUE) {
6406 printf("."); fflush(stdout);
6407 }
6408
6409 if(TRUE) {
6410 printf("."); fflush(stdout);
6411 }
6412
6413 if(TRUE) {
6414 printf("."); fflush(stdout);
6415 }
6416
6417 if(TRUE) {
6418 unur_reset_errno();
6419 do {
6420 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[46]);
6421 par = unur_cstd_new(distr_localcopy);
6422 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6423 gen = unur_init(par);
6424 if (gen) {
6425 unur_cstd_chg_truncated(gen,0.5,0.55);
6426 }
6427 rcode = run_validate_chi2(TESTLOG,0,gen,distr[46],'+');
6428 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6429 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6430 unur_free(gen);
6431 unur_distr_free(distr_localcopy);
6432 } while (0);
6433 }
6434
6435 if(TRUE) {
6436 printf("."); fflush(stdout);
6437 }
6438
6439 /* distribution [47] */
6440
6441 if(fullcheck) {
6442 unur_reset_errno();
6443 do {
6444 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[47]);
6445 par = unur_cstd_new(distr_localcopy);
6446 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6447 gen = unur_init(par);
6448 rcode = run_validate_chi2(TESTLOG,0,gen,distr[47],'+');
6449 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6450 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6451 unur_free(gen);
6452 unur_distr_free(distr_localcopy);
6453 } while (0);
6454 }
6455
6456 if(fullcheck) {
6457 printf("."); fflush(stdout);
6458 }
6459
6460 if(fullcheck) {
6461 printf("."); fflush(stdout);
6462 }
6463
6464 if(fullcheck) {
6465 printf("."); fflush(stdout);
6466 }
6467
6468 if(fullcheck) {
6469 printf("."); fflush(stdout);
6470 }
6471
6472 if(fullcheck) {
6473 printf("."); fflush(stdout);
6474 }
6475
6476 if(fullcheck) {
6477 printf("."); fflush(stdout);
6478 }
6479
6480 if(fullcheck) {
6481 printf("."); fflush(stdout);
6482 }
6483
6484 if(fullcheck) {
6485 printf("."); fflush(stdout);
6486 }
6487
6488 if(fullcheck) {
6489 printf("."); fflush(stdout);
6490 }
6491
6492 if(fullcheck) {
6493 unur_reset_errno();
6494 do {
6495 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[47]);
6496 par = unur_cstd_new(distr_localcopy);
6497 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6498 gen = unur_init(par);
6499 if (gen) {
6500 unur_cstd_chg_truncated(gen,0.5,0.55);
6501 }
6502 rcode = run_validate_chi2(TESTLOG,0,gen,distr[47],'+');
6503 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6504 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6505 unur_free(gen);
6506 unur_distr_free(distr_localcopy);
6507 } while (0);
6508 }
6509
6510 if(fullcheck) {
6511 printf("."); fflush(stdout);
6512 }
6513
6514 /* distribution [48] */
6515
6516 if(fullcheck) {
6517 unur_reset_errno();
6518 do {
6519 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[48]);
6520 par = unur_cstd_new(distr_localcopy);
6521 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6522 gen = unur_init(par);
6523 rcode = run_validate_chi2(TESTLOG,0,gen,distr[48],'+');
6524 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6525 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6526 unur_free(gen);
6527 unur_distr_free(distr_localcopy);
6528 } while (0);
6529 }
6530
6531 if(fullcheck) {
6532 printf("."); fflush(stdout);
6533 }
6534
6535 if(fullcheck) {
6536 printf("."); fflush(stdout);
6537 }
6538
6539 if(fullcheck) {
6540 printf("."); fflush(stdout);
6541 }
6542
6543 if(fullcheck) {
6544 printf("."); fflush(stdout);
6545 }
6546
6547 if(fullcheck) {
6548 printf("."); fflush(stdout);
6549 }
6550
6551 if(fullcheck) {
6552 printf("."); fflush(stdout);
6553 }
6554
6555 if(fullcheck) {
6556 printf("."); fflush(stdout);
6557 }
6558
6559 if(fullcheck) {
6560 printf("."); fflush(stdout);
6561 }
6562
6563 if(fullcheck) {
6564 printf("."); fflush(stdout);
6565 }
6566
6567 if(fullcheck) {
6568 unur_reset_errno();
6569 do {
6570 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[48]);
6571 par = unur_cstd_new(distr_localcopy);
6572 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6573 gen = unur_init(par);
6574 if (gen) {
6575 unur_cstd_chg_truncated(gen,0.5,0.55);
6576 }
6577 rcode = run_validate_chi2(TESTLOG,0,gen,distr[48],'+');
6578 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6579 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6580 unur_free(gen);
6581 unur_distr_free(distr_localcopy);
6582 } while (0);
6583 }
6584
6585 if(fullcheck) {
6586 printf("."); fflush(stdout);
6587 }
6588
6589 /* distribution [49] */
6590
6591 if(TRUE) {
6592 unur_reset_errno();
6593 do {
6594 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[49]);
6595 par = unur_cstd_new(distr_localcopy);
6596 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6597 gen = unur_init(par);
6598 rcode = run_validate_chi2(TESTLOG,0,gen,distr[49],'+');
6599 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6600 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6601 unur_free(gen);
6602 unur_distr_free(distr_localcopy);
6603 } while (0);
6604 }
6605
6606 if(TRUE) {
6607 unur_reset_errno();
6608 do {
6609 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[49]);
6610 par = unur_cstd_new(distr_localcopy);
6611 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6612 gen = unur_init(par);
6613 rcode = run_validate_chi2(TESTLOG,0,gen,distr[49],'0');
6614 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6615 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6616 unur_free(gen);
6617 unur_distr_free(distr_localcopy);
6618 } while (0);
6619 }
6620
6621 if(TRUE) {
6622 printf("."); fflush(stdout);
6623 }
6624
6625 if(TRUE) {
6626 printf("."); fflush(stdout);
6627 }
6628
6629 if(TRUE) {
6630 printf("."); fflush(stdout);
6631 }
6632
6633 if(TRUE) {
6634 printf("."); fflush(stdout);
6635 }
6636
6637 if(TRUE) {
6638 printf("."); fflush(stdout);
6639 }
6640
6641 if(TRUE) {
6642 printf("."); fflush(stdout);
6643 }
6644
6645 if(TRUE) {
6646 printf("."); fflush(stdout);
6647 }
6648
6649 if(TRUE) {
6650 printf("."); fflush(stdout);
6651 }
6652
6653 if(TRUE) {
6654 unur_reset_errno();
6655 do {
6656 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[49]);
6657 par = unur_cstd_new(distr_localcopy);
6658 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6659 gen = unur_init(par);
6660 if (gen) {
6661 unur_cstd_chg_truncated(gen,0.5,0.55);
6662 }
6663 rcode = run_validate_chi2(TESTLOG,0,gen,distr[49],'+');
6664 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6665 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6666 unur_free(gen);
6667 unur_distr_free(distr_localcopy);
6668 } while (0);
6669 }
6670
6671 if(TRUE) {
6672 unur_reset_errno();
6673 do {
6674 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[49]);
6675 { UNUR_DISTR *dg =NULL;
6676 par = unur_cstd_new(distr_localcopy);
6677 fpm[0] = 2.;
6678 fpm[1] = 5.;
6679 gen = unur_init(par);
6680 if (gen) {
6681 dg = unur_get_distr(gen);
6682 unur_distr_cont_set_pdfparams(dg,fpm,2);
6683 unur_reinit(gen); }
6684 }
6685 rcode = run_validate_chi2(TESTLOG,0,gen,distr[49],'+');
6686 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6687 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6688 unur_free(gen);
6689 unur_distr_free(distr_localcopy);
6690 } while (0);
6691 }
6692
6693 /* distribution [50] */
6694
6695 if(TRUE) {
6696 unur_reset_errno();
6697 do {
6698 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[50]);
6699 par = unur_cstd_new(distr_localcopy);
6700 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6701 gen = unur_init(par);
6702 rcode = run_validate_chi2(TESTLOG,0,gen,distr[50],'+');
6703 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6704 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6705 unur_free(gen);
6706 unur_distr_free(distr_localcopy);
6707 } while (0);
6708 }
6709
6710 if(TRUE) {
6711 printf("."); fflush(stdout);
6712 }
6713
6714 if(TRUE) {
6715 printf("."); fflush(stdout);
6716 }
6717
6718 if(TRUE) {
6719 printf("."); fflush(stdout);
6720 }
6721
6722 if(TRUE) {
6723 printf("."); fflush(stdout);
6724 }
6725
6726 if(TRUE) {
6727 printf("."); fflush(stdout);
6728 }
6729
6730 if(TRUE) {
6731 printf("."); fflush(stdout);
6732 }
6733
6734 if(TRUE) {
6735 printf("."); fflush(stdout);
6736 }
6737
6738 if(TRUE) {
6739 printf("."); fflush(stdout);
6740 }
6741
6742 if(TRUE) {
6743 printf("."); fflush(stdout);
6744 }
6745
6746 if(TRUE) {
6747 unur_reset_errno();
6748 do {
6749 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[50]);
6750 par = unur_cstd_new(distr_localcopy);
6751 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6752 gen = unur_init(par);
6753 if (gen) {
6754 unur_cstd_chg_truncated(gen,0.5,0.55);
6755 }
6756 rcode = run_validate_chi2(TESTLOG,0,gen,distr[50],'+');
6757 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6758 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6759 unur_free(gen);
6760 unur_distr_free(distr_localcopy);
6761 } while (0);
6762 }
6763
6764 if(TRUE) {
6765 unur_reset_errno();
6766 do {
6767 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[50]);
6768 { UNUR_DISTR *dg =NULL;
6769 par = unur_cstd_new(distr_localcopy);
6770 fpm[0] = 2.;
6771 fpm[1] = 5.;
6772 gen = unur_init(par);
6773 if (gen) {
6774 dg = unur_get_distr(gen);
6775 unur_distr_cont_set_pdfparams(dg,fpm,2);
6776 unur_reinit(gen); }
6777 }
6778 rcode = run_validate_chi2(TESTLOG,0,gen,distr[50],'+');
6779 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6780 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6781 unur_free(gen);
6782 unur_distr_free(distr_localcopy);
6783 } while (0);
6784 }
6785
6786 /* distribution [51] */
6787
6788 if(TRUE) {
6789 unur_reset_errno();
6790 do {
6791 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[51]);
6792 par = unur_cstd_new(distr_localcopy);
6793 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6794 gen = unur_init(par);
6795 rcode = run_validate_chi2(TESTLOG,0,gen,distr[51],'+');
6796 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6797 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6798 unur_free(gen);
6799 unur_distr_free(distr_localcopy);
6800 } while (0);
6801 }
6802
6803 if(TRUE) {
6804 printf("."); fflush(stdout);
6805 }
6806
6807 if(TRUE) {
6808 printf("."); fflush(stdout);
6809 }
6810
6811 if(TRUE) {
6812 printf("."); fflush(stdout);
6813 }
6814
6815 if(TRUE) {
6816 printf("."); fflush(stdout);
6817 }
6818
6819 if(TRUE) {
6820 printf("."); fflush(stdout);
6821 }
6822
6823 if(TRUE) {
6824 printf("."); fflush(stdout);
6825 }
6826
6827 if(TRUE) {
6828 printf("."); fflush(stdout);
6829 }
6830
6831 if(TRUE) {
6832 printf("."); fflush(stdout);
6833 }
6834
6835 if(TRUE) {
6836 printf("."); fflush(stdout);
6837 }
6838
6839 if(TRUE) {
6840 unur_reset_errno();
6841 do {
6842 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[51]);
6843 par = unur_cstd_new(distr_localcopy);
6844 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6845 gen = unur_init(par);
6846 if (gen) {
6847 unur_cstd_chg_truncated(gen,0.5,0.55);
6848 }
6849 rcode = run_validate_chi2(TESTLOG,0,gen,distr[51],'+');
6850 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6851 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6852 unur_free(gen);
6853 unur_distr_free(distr_localcopy);
6854 } while (0);
6855 }
6856
6857 if(TRUE) {
6858 unur_reset_errno();
6859 do {
6860 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[51]);
6861 { UNUR_DISTR *dg =NULL;
6862 par = unur_cstd_new(distr_localcopy);
6863 fpm[0] = 2.;
6864 fpm[1] = 5.;
6865 gen = unur_init(par);
6866 if (gen) {
6867 dg = unur_get_distr(gen);
6868 unur_distr_cont_set_pdfparams(dg,fpm,2);
6869 unur_reinit(gen); }
6870 }
6871 rcode = run_validate_chi2(TESTLOG,0,gen,distr[51],'+');
6872 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6873 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6874 unur_free(gen);
6875 unur_distr_free(distr_localcopy);
6876 } while (0);
6877 }
6878
6879 /* distribution [20] */
6880
6881 if(TRUE) {
6882 unur_reset_errno();
6883 do {
6884 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[20]);
6885 par = unur_cstd_new(distr_localcopy);
6886 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6887 gen = unur_init(par);
6888 rcode = run_validate_chi2(TESTLOG,0,gen,distr[20],'+');
6889 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6890 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6891 unur_free(gen);
6892 unur_distr_free(distr_localcopy);
6893 } while (0);
6894 }
6895
6896 if(TRUE) {
6897 printf("."); fflush(stdout);
6898 }
6899
6900 if(TRUE) {
6901 printf("."); fflush(stdout);
6902 }
6903
6904 if(TRUE) {
6905 printf("."); fflush(stdout);
6906 }
6907
6908 if(TRUE) {
6909 printf("."); fflush(stdout);
6910 }
6911
6912 if(TRUE) {
6913 printf("."); fflush(stdout);
6914 }
6915
6916 if(TRUE) {
6917 printf("."); fflush(stdout);
6918 }
6919
6920 if(TRUE) {
6921 printf("."); fflush(stdout);
6922 }
6923
6924 if(TRUE) {
6925 printf("."); fflush(stdout);
6926 }
6927
6928 if(TRUE) {
6929 printf("."); fflush(stdout);
6930 }
6931
6932 if(TRUE) {
6933 unur_reset_errno();
6934 do {
6935 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[20]);
6936 par = unur_cstd_new(distr_localcopy);
6937 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6938 gen = unur_init(par);
6939 if (gen) {
6940 unur_cstd_chg_truncated(gen,0.5,0.55);
6941 }
6942 rcode = run_validate_chi2(TESTLOG,0,gen,distr[20],'+');
6943 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6944 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6945 unur_free(gen);
6946 unur_distr_free(distr_localcopy);
6947 } while (0);
6948 }
6949
6950 if(TRUE) {
6951 unur_reset_errno();
6952 do {
6953 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[20]);
6954 { UNUR_DISTR *dg =NULL;
6955 par = unur_cstd_new(distr_localcopy);
6956 fpm[0] = 2.;
6957 fpm[1] = 5.;
6958 gen = unur_init(par);
6959 if (gen) {
6960 dg = unur_get_distr(gen);
6961 unur_distr_cont_set_pdfparams(dg,fpm,2);
6962 unur_reinit(gen); }
6963 }
6964 rcode = run_validate_chi2(TESTLOG,0,gen,distr[20],'+');
6965 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6966 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6967 unur_free(gen);
6968 unur_distr_free(distr_localcopy);
6969 } while (0);
6970 }
6971
6972 /* distribution [21] */
6973
6974 if(TRUE) {
6975 unur_reset_errno();
6976 do {
6977 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[21]);
6978 par = unur_cstd_new(distr_localcopy);
6979 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
6980 gen = unur_init(par);
6981 rcode = run_validate_chi2(TESTLOG,0,gen,distr[21],'+');
6982 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
6983 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
6984 unur_free(gen);
6985 unur_distr_free(distr_localcopy);
6986 } while (0);
6987 }
6988
6989 if(TRUE) {
6990 printf("."); fflush(stdout);
6991 }
6992
6993 if(TRUE) {
6994 printf("."); fflush(stdout);
6995 }
6996
6997 if(TRUE) {
6998 printf("."); fflush(stdout);
6999 }
7000
7001 if(TRUE) {
7002 printf("."); fflush(stdout);
7003 }
7004
7005 if(TRUE) {
7006 printf("."); fflush(stdout);
7007 }
7008
7009 if(TRUE) {
7010 printf("."); fflush(stdout);
7011 }
7012
7013 if(TRUE) {
7014 printf("."); fflush(stdout);
7015 }
7016
7017 if(TRUE) {
7018 printf("."); fflush(stdout);
7019 }
7020
7021 if(TRUE) {
7022 printf("."); fflush(stdout);
7023 }
7024
7025 if(TRUE) {
7026 printf("."); fflush(stdout);
7027 }
7028
7029 if(TRUE) {
7030 unur_reset_errno();
7031 do {
7032 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[21]);
7033 { UNUR_DISTR *dg =NULL;
7034 par = unur_cstd_new(distr_localcopy);
7035 fpm[0] = 2.;
7036 fpm[1] = 5.;
7037 gen = unur_init(par);
7038 if (gen) {
7039 dg = unur_get_distr(gen);
7040 unur_distr_cont_set_pdfparams(dg,fpm,2);
7041 unur_reinit(gen); }
7042 }
7043 rcode = run_validate_chi2(TESTLOG,0,gen,distr[21],'+');
7044 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
7045 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
7046 unur_free(gen);
7047 unur_distr_free(distr_localcopy);
7048 } while (0);
7049 }
7050
7051 /* distribution [22] */
7052
7053 if(TRUE) {
7054 unur_reset_errno();
7055 do {
7056 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[22]);
7057 par = unur_cstd_new(distr_localcopy);
7058 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
7059 gen = unur_init(par);
7060 rcode = run_validate_chi2(TESTLOG,0,gen,distr[22],'+');
7061 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
7062 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
7063 unur_free(gen);
7064 unur_distr_free(distr_localcopy);
7065 } while (0);
7066 }
7067
7068 if(TRUE) {
7069 printf("."); fflush(stdout);
7070 }
7071
7072 if(TRUE) {
7073 printf("."); fflush(stdout);
7074 }
7075
7076 if(TRUE) {
7077 printf("."); fflush(stdout);
7078 }
7079
7080 if(TRUE) {
7081 printf("."); fflush(stdout);
7082 }
7083
7084 if(TRUE) {
7085 printf("."); fflush(stdout);
7086 }
7087
7088 if(TRUE) {
7089 printf("."); fflush(stdout);
7090 }
7091
7092 if(TRUE) {
7093 printf("."); fflush(stdout);
7094 }
7095
7096 if(TRUE) {
7097 printf("."); fflush(stdout);
7098 }
7099
7100 if(TRUE) {
7101 printf("."); fflush(stdout);
7102 }
7103
7104 if(TRUE) {
7105 unur_reset_errno();
7106 do {
7107 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[22]);
7108 par = unur_cstd_new(distr_localcopy);
7109 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
7110 gen = unur_init(par);
7111 if (gen) {
7112 unur_cstd_chg_truncated(gen,0.5,0.55);
7113 }
7114 rcode = run_validate_chi2(TESTLOG,0,gen,distr[22],'+');
7115 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
7116 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
7117 unur_free(gen);
7118 unur_distr_free(distr_localcopy);
7119 } while (0);
7120 }
7121
7122 if(TRUE) {
7123 unur_reset_errno();
7124 do {
7125 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[22]);
7126 { UNUR_DISTR *dg =NULL;
7127 par = unur_cstd_new(distr_localcopy);
7128 fpm[0] = 2.;
7129 fpm[1] = 5.;
7130 gen = unur_init(par);
7131 if (gen) {
7132 dg = unur_get_distr(gen);
7133 unur_distr_cont_set_pdfparams(dg,fpm,2);
7134 unur_reinit(gen); }
7135 }
7136 rcode = run_validate_chi2(TESTLOG,0,gen,distr[22],'+');
7137 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
7138 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
7139 unur_free(gen);
7140 unur_distr_free(distr_localcopy);
7141 } while (0);
7142 }
7143
7144 /* distribution [65] */
7145
7146 if(fullcheck) {
7147 unur_reset_errno();
7148 do {
7149 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[65]);
7150 par = unur_cstd_new(distr_localcopy);
7151 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
7152 gen = unur_init(par);
7153 rcode = run_validate_chi2(TESTLOG,0,gen,distr[65],'-');
7154 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
7155 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
7156 unur_free(gen);
7157 unur_distr_free(distr_localcopy);
7158 } while (0);
7159 }
7160
7161 if(fullcheck) {
7162 unur_reset_errno();
7163 do {
7164 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[65]);
7165 par = unur_cstd_new(distr_localcopy);
7166 if (unur_cstd_set_variant(par,1)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
7167 gen = unur_init(par);
7168 rcode = run_validate_chi2(TESTLOG,0,gen,distr[65],'-');
7169 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
7170 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
7171 unur_free(gen);
7172 unur_distr_free(distr_localcopy);
7173 } while (0);
7174 }
7175
7176 if(fullcheck) {
7177 unur_reset_errno();
7178 do {
7179 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[65]);
7180 par = unur_cstd_new(distr_localcopy);
7181 if (unur_cstd_set_variant(par,2)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
7182 gen = unur_init(par);
7183 rcode = run_validate_chi2(TESTLOG,0,gen,distr[65],'-');
7184 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
7185 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
7186 unur_free(gen);
7187 unur_distr_free(distr_localcopy);
7188 } while (0);
7189 }
7190
7191 if(fullcheck) {
7192 unur_reset_errno();
7193 do {
7194 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[65]);
7195 par = unur_cstd_new(distr_localcopy);
7196 if (unur_cstd_set_variant(par,3)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
7197 gen = unur_init(par);
7198 rcode = run_validate_chi2(TESTLOG,0,gen,distr[65],'-');
7199 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
7200 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
7201 unur_free(gen);
7202 unur_distr_free(distr_localcopy);
7203 } while (0);
7204 }
7205
7206 if(fullcheck) {
7207 printf("."); fflush(stdout);
7208 }
7209
7210 if(fullcheck) {
7211 printf("."); fflush(stdout);
7212 }
7213
7214 if(fullcheck) {
7215 printf("."); fflush(stdout);
7216 }
7217
7218 if(fullcheck) {
7219 printf("."); fflush(stdout);
7220 }
7221
7222 if(fullcheck) {
7223 printf("."); fflush(stdout);
7224 }
7225
7226 if(fullcheck) {
7227 printf("."); fflush(stdout);
7228 }
7229
7230 if(fullcheck) {
7231 printf("."); fflush(stdout);
7232 }
7233
7234 if(fullcheck) {
7235 printf("."); fflush(stdout);
7236 }
7237
7238 /* distribution [78] */
7239
7240 if(TRUE) {
7241 unur_reset_errno();
7242 do {
7243 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[78]);
7244 par = unur_cstd_new(distr_localcopy);
7245 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
7246 gen = unur_init(par);
7247 rcode = run_validate_chi2(TESTLOG,0,gen,distr[78],'0');
7248 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
7249 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
7250 unur_free(gen);
7251 unur_distr_free(distr_localcopy);
7252 } while (0);
7253 }
7254
7255 if(TRUE) {
7256 printf("."); fflush(stdout);
7257 }
7258
7259 if(TRUE) {
7260 printf("."); fflush(stdout);
7261 }
7262
7263 if(TRUE) {
7264 printf("."); fflush(stdout);
7265 }
7266
7267 if(TRUE) {
7268 printf("."); fflush(stdout);
7269 }
7270
7271 if(TRUE) {
7272 printf("."); fflush(stdout);
7273 }
7274
7275 if(TRUE) {
7276 printf("."); fflush(stdout);
7277 }
7278
7279 if(TRUE) {
7280 printf("."); fflush(stdout);
7281 }
7282
7283 if(TRUE) {
7284 printf("."); fflush(stdout);
7285 }
7286
7287 if(TRUE) {
7288 printf("."); fflush(stdout);
7289 }
7290
7291 if(TRUE) {
7292 printf("."); fflush(stdout);
7293 }
7294
7295 if(TRUE) {
7296 printf("."); fflush(stdout);
7297 }
7298
7299 /* distribution [79] */
7300
7301 if(TRUE) {
7302 unur_reset_errno();
7303 do {
7304 UNUR_DISTR *distr_localcopy = unur_distr_clone(distr[79]);
7305 par = unur_cstd_new(distr_localcopy);
7306 if (unur_cstd_set_variant(par,UNUR_STDGEN_INVERSION)!=UNUR_SUCCESS) { if (par) unur_par_free(par); par = NULL; }
7307 gen = unur_init(par);
7308 rcode = run_validate_chi2(TESTLOG,0,gen,distr[79],'+');
7309 n_tests_failed += (rcode==UNUR_SUCCESS)?0:1;
7310 n_tests_failed += (rcode==UNUR_FAILURE)?1000:0;
7311 unur_free(gen);
7312 unur_distr_free(distr_localcopy);
7313 } while (0);
7314 }
7315
7316 if(TRUE) {
7317 printf("."); fflush(stdout);
7318 }
7319
7320 if(TRUE) {
7321 printf("."); fflush(stdout);
7322 }
7323
7324 if(TRUE) {
7325 printf("."); fflush(stdout);
7326 }
7327
7328 if(TRUE) {
7329 printf("."); fflush(stdout);
7330 }
7331
7332 if(TRUE) {
7333 printf("."); fflush(stdout);
7334 }
7335
7336 if(TRUE) {
7337 printf("."); fflush(stdout);
7338 }
7339
7340 if(TRUE) {
7341 printf("."); fflush(stdout);
7342 }
7343
7344 if(TRUE) {
7345 printf("."); fflush(stdout);
7346 }
7347
7348 if(TRUE) {
7349 printf("."); fflush(stdout);
7350 }
7351
7352 if(TRUE) {
7353 printf("."); fflush(stdout);
7354 }
7355
7356 if(TRUE) {
7357 printf("."); fflush(stdout);
7358 }
7359
7360 /* timing */
7361 stopwatch_print(TESTLOG,"\n<*>time = %.0f ms\n", stopwatch_lap(&watch));
7362
7363
7364 /* free distributions */
7365 unur_distr_free(distr[0]);
7366 unur_distr_free(distr[1]);
7367 unur_distr_free(distr[2]);
7368 unur_distr_free(distr[3]);
7369 unur_distr_free(distr[4]);
7370 unur_distr_free(distr[5]);
7371 unur_distr_free(distr[6]);
7372 unur_distr_free(distr[7]);
7373 unur_distr_free(distr[8]);
7374 unur_distr_free(distr[9]);
7375 unur_distr_free(distr[10]);
7376 unur_distr_free(distr[11]);
7377 unur_distr_free(distr[12]);
7378 unur_distr_free(distr[13]);
7379 unur_distr_free(distr[14]);
7380 unur_distr_free(distr[15]);
7381 unur_distr_free(distr[16]);
7382 unur_distr_free(distr[17]);
7383 unur_distr_free(distr[18]);
7384 unur_distr_free(distr[19]);
7385 unur_distr_free(distr[20]);
7386 unur_distr_free(distr[21]);
7387 unur_distr_free(distr[22]);
7388 unur_distr_free(distr[23]);
7389 unur_distr_free(distr[24]);
7390 unur_distr_free(distr[25]);
7391 unur_distr_free(distr[26]);
7392 unur_distr_free(distr[27]);
7393 unur_distr_free(distr[28]);
7394 unur_distr_free(distr[29]);
7395 unur_distr_free(distr[30]);
7396 unur_distr_free(distr[31]);
7397 unur_distr_free(distr[32]);
7398 unur_distr_free(distr[33]);
7399 unur_distr_free(distr[34]);
7400 unur_distr_free(distr[35]);
7401 unur_distr_free(distr[36]);
7402 unur_distr_free(distr[37]);
7403 unur_distr_free(distr[38]);
7404 unur_distr_free(distr[39]);
7405 unur_distr_free(distr[40]);
7406 unur_distr_free(distr[41]);
7407 unur_distr_free(distr[42]);
7408 unur_distr_free(distr[43]);
7409 unur_distr_free(distr[44]);
7410 unur_distr_free(distr[45]);
7411 unur_distr_free(distr[46]);
7412 unur_distr_free(distr[47]);
7413 unur_distr_free(distr[48]);
7414 unur_distr_free(distr[49]);
7415 unur_distr_free(distr[50]);
7416 unur_distr_free(distr[51]);
7417 unur_distr_free(distr[52]);
7418 unur_distr_free(distr[53]);
7419 unur_distr_free(distr[54]);
7420 unur_distr_free(distr[55]);
7421 unur_distr_free(distr[56]);
7422 unur_distr_free(distr[57]);
7423 unur_distr_free(distr[58]);
7424 unur_distr_free(distr[59]);
7425 unur_distr_free(distr[60]);
7426 unur_distr_free(distr[61]);
7427 unur_distr_free(distr[62]);
7428 unur_distr_free(distr[63]);
7429 unur_distr_free(distr[64]);
7430 unur_distr_free(distr[65]);
7431 unur_distr_free(distr[66]);
7432 unur_distr_free(distr[67]);
7433 unur_distr_free(distr[68]);
7434 unur_distr_free(distr[69]);
7435 unur_distr_free(distr[70]);
7436 unur_distr_free(distr[71]);
7437 unur_distr_free(distr[72]);
7438 unur_distr_free(distr[73]);
7439 unur_distr_free(distr[74]);
7440 unur_distr_free(distr[75]);
7441 unur_distr_free(distr[76]);
7442 unur_distr_free(distr[77]);
7443 unur_distr_free(distr[78]);
7444 unur_distr_free(distr[79]);
7445
7446 /* test finished */
7447 test_ok &= (n_tests_failed>CHI2_FAILURES_TOLERATED) ? 0 : 1;
7448 /* we accept CHI2_FAILURES_TOLERATED failures */
7449 (n_tests_failed>CHI2_FAILURES_TOLERATED) ? printf(" ==> failed] ") : printf(" ==> ok] ");
7450
7451 /* prevent compiler from making useless annoying warnings */
7452 distr[0] = NULL;
7453 par = NULL;
7454 gen = NULL;
7455 darray = NULL;
7456 fpm[0] = 0.;
7457
7458 } /* end of test_validate */
7459
7460 /*---------------------------------------------------------------------------*/
7461 /* [special] */
7462
test_special(void)7463 void test_special (void)
7464 {
7465 /* set boolean to FALSE */
7466 int FAILED = 0;
7467
7468
7469
7470
7471
7472
7473 int samplesize = UERROR_SAMPLESIZE;
7474 double ures = UERROR_RESOLUTION;
7475
7476 int errorsum = 0;
7477 double fpar[5];
7478
7479 UNUR_DISTR *distr;
7480
7481 /* start test */
7482 printf("[special "); fflush(stdout);
7483 fprintf(TESTLOG,"\n[special]\n");
7484
7485 /* set stop watch */
7486 stopwatch_lap(&watch);
7487
7488
7489
7490 /* test for maximal u-error */
7491 printf("\n[test maximal u-error for inversion method]\n");
7492 fprintf(TESTLOG,"\n* Test maximal u-error for inversion method *\n");
7493
7494
7495 printf(" beta");
7496
7497 fpar[0] = 3.;
7498 fpar[1] = 4.;
7499 distr = unur_distr_beta(fpar,2);
7500 errorsum += estimate_uerror(distr,ures,samplesize);
7501
7502 fpar[0] = 1.;
7503 fpar[1] = 2.;
7504 fpar[2] = 3.;
7505 fpar[3] = 4.;
7506 distr = unur_distr_beta(fpar,4);
7507 errorsum += estimate_uerror(distr,ures,samplesize);
7508
7509
7510 printf(" burr");
7511
7512 fpar[0] = 1.;
7513 distr = unur_distr_burr(fpar,1);
7514 errorsum += estimate_uerror(distr,ures,samplesize);
7515
7516 fpar[0] = 2.;
7517 fpar[1] = 2.;
7518 distr = unur_distr_burr(fpar,2);
7519 errorsum += estimate_uerror(distr,ures,samplesize);
7520
7521 fpar[0] = 3.;
7522 fpar[1] = 2.;
7523 fpar[2] = 3.;
7524 distr = unur_distr_burr(fpar,3);
7525 errorsum += estimate_uerror(distr,ures,samplesize);
7526
7527 fpar[0] = 4.;
7528 fpar[1] = 1.;
7529 fpar[2] = 2.;
7530 distr = unur_distr_burr(fpar,3);
7531 errorsum += estimate_uerror(distr,1e-10,samplesize);
7532 /* computation of CDF and /or inverse CDF is not seem very accurate */
7533
7534 fpar[0] = 5.;
7535 fpar[1] = 2.;
7536 fpar[2] = 3.;
7537 distr = unur_distr_burr(fpar,3);
7538 errorsum += estimate_uerror(distr,ures,samplesize);
7539
7540 fpar[0] = 6.;
7541 fpar[1] = 2.;
7542 fpar[2] = 3.;
7543 distr = unur_distr_burr(fpar,3);
7544 errorsum += estimate_uerror(distr,ures,samplesize);
7545
7546 fpar[0] = 7.;
7547 fpar[1] = 2.;
7548 fpar[2] = 3.;
7549 distr = unur_distr_burr(fpar,3);
7550 errorsum += estimate_uerror(distr,ures,samplesize);
7551
7552 fpar[0] = 8.;
7553 fpar[1] = 2.;
7554 distr = unur_distr_burr(fpar,2);
7555 errorsum += estimate_uerror(distr,ures,samplesize);
7556
7557 fpar[0] = 9.;
7558 fpar[1] = 2.;
7559 fpar[2] = 3.;
7560 distr = unur_distr_burr(fpar,3);
7561 errorsum += estimate_uerror(distr,ures,samplesize);
7562
7563 fpar[0] = 10.;
7564 fpar[1] = 2.;
7565 distr = unur_distr_burr(fpar,2);
7566 errorsum += estimate_uerror(distr,ures,samplesize);
7567
7568 fpar[0] = 11.;
7569 fpar[1] = 2.;
7570 distr = unur_distr_burr(fpar,2);
7571 errorsum += estimate_uerror(distr,ures,samplesize);
7572
7573 fpar[0] = 12.;
7574 fpar[1] = 2.;
7575 fpar[2] = 3.;
7576 distr = unur_distr_burr(fpar,3);
7577 errorsum += estimate_uerror(distr,ures,samplesize);
7578
7579
7580 printf(" cauchy");
7581 fpar[0] = 1.;
7582 fpar[1] = 2.;
7583 distr = unur_distr_cauchy(fpar,2);
7584 errorsum += estimate_uerror(distr,ures,samplesize);
7585
7586
7587 printf(" chi");
7588 fpar[0] = 3.;
7589 distr = unur_distr_chi(fpar,1);
7590 errorsum += estimate_uerror(distr,ures,samplesize);
7591
7592
7593 printf(" chisquare");
7594 fpar[0] = 3.;
7595 distr = unur_distr_chisquare(fpar,1);
7596 errorsum += estimate_uerror(distr,ures,samplesize);
7597
7598
7599 printf(" exponential");
7600 fpar[0] = 1.;
7601 fpar[1] = 2.;
7602 distr = unur_distr_exponential(fpar,2);
7603 errorsum += estimate_uerror(distr,ures,samplesize);
7604
7605
7606 printf(" extremeI");
7607 fpar[0] = 1.;
7608 fpar[1] = 2.;
7609 distr = unur_distr_extremeI(fpar,2);
7610 errorsum += estimate_uerror(distr,ures,samplesize);
7611
7612
7613 printf(" extremeII");
7614 fpar[0] = 1.;
7615 fpar[1] = 2.;
7616 fpar[2] = 3.;
7617 distr = unur_distr_extremeII(fpar,3);
7618 errorsum += estimate_uerror(distr,ures,samplesize);
7619
7620
7621 printf(" F");
7622 fpar[0] = 3.;
7623 fpar[1] = 4.;
7624 distr = unur_distr_F(fpar,2);
7625 errorsum += estimate_uerror(distr,ures,samplesize);
7626
7627
7628 printf(" gamma");
7629
7630 fpar[0] = 5.;
7631 distr = unur_distr_gamma(fpar,1);
7632 errorsum += estimate_uerror(distr,ures,samplesize);
7633
7634 fpar[0] = 4.;
7635 fpar[1] = 3.;
7636 distr = unur_distr_gamma(fpar,2);
7637 errorsum += estimate_uerror(distr,ures,samplesize);
7638
7639 fpar[0] = 3.;
7640 fpar[1] = 2.;
7641 fpar[2] = 1.;
7642 distr = unur_distr_gamma(fpar,3);
7643 errorsum += estimate_uerror(distr,ures,samplesize);
7644
7645
7646 printf(" gig");
7647 fpar[0] = 1.;
7648 fpar[1] = 2.;
7649 fpar[1] = 3.;
7650 distr = unur_distr_gig(fpar,3);
7651 errorsum += estimate_uerror(distr,ures,samplesize);
7652
7653
7654 printf(" gig2");
7655 fpar[0] = 1.;
7656 fpar[1] = 2.;
7657 fpar[2] = 3.;
7658 distr = unur_distr_gig2(fpar,3);
7659 errorsum += estimate_uerror(distr,ures,samplesize);
7660
7661
7662 printf(" ghyp");
7663 fpar[0] = 1.;
7664 fpar[1] = 3.;
7665 fpar[2] = 2.;
7666 fpar[3] = 4.;
7667 fpar[4] = 5.;
7668 distr = unur_distr_ghyp(fpar,5);
7669 errorsum += estimate_uerror(distr,ures,samplesize);
7670
7671
7672 printf(" hyperbolic");
7673 fpar[0] = 3.;
7674 fpar[1] = 2.;
7675 fpar[2] = 2.;
7676 fpar[3] = 2.;
7677 distr = unur_distr_hyperbolic(fpar,4);
7678 errorsum += estimate_uerror(distr,ures,samplesize);
7679
7680
7681 printf(" ig");
7682 fpar[0] = 1.;
7683 fpar[1] = 2.;
7684 distr = unur_distr_ig(fpar,2);
7685 errorsum += estimate_uerror(distr,ures,samplesize);
7686
7687
7688 printf(" laplace");
7689 fpar[0] = 1.;
7690 fpar[1] = 2.;
7691 distr = unur_distr_laplace(fpar,2);
7692 errorsum += estimate_uerror(distr,ures,samplesize);
7693
7694
7695 printf(" logistic");
7696 fpar[0] = 1.;
7697 fpar[1] = 2.;
7698 distr = unur_distr_logistic(fpar,2);
7699 errorsum += estimate_uerror(distr,ures,samplesize);
7700
7701
7702 printf(" lognormal");
7703 fpar[0] = 1.;
7704 fpar[1] = 2.;
7705 fpar[2] = 3.;
7706 distr = unur_distr_lognormal(fpar,3);
7707 errorsum += estimate_uerror(distr,ures,samplesize);
7708
7709
7710 printf(" lomax");
7711 fpar[0] = 1.;
7712 fpar[1] = 2.;
7713 distr = unur_distr_lomax(fpar,2);
7714 errorsum += estimate_uerror(distr,ures,samplesize);
7715
7716
7717 printf(" normal");
7718 fpar[0] = 1.;
7719 fpar[1] = 2.;
7720 distr = unur_distr_normal(fpar,2);
7721 errorsum += estimate_uerror(distr,ures,samplesize);
7722
7723
7724 printf(" pareto");
7725 fpar[0] = 1.;
7726 fpar[1] = 2.;
7727 distr = unur_distr_pareto(fpar,2);
7728 errorsum += estimate_uerror(distr,ures,samplesize);
7729
7730
7731 printf(" powerexponential");
7732 fpar[0] = 3.;
7733 distr = unur_distr_powerexponential(fpar,1);
7734 errorsum += estimate_uerror(distr,ures,samplesize);
7735
7736
7737 printf(" rayleigh");
7738 fpar[0] = 2.;
7739 distr = unur_distr_rayleigh(fpar,1);
7740 errorsum += estimate_uerror(distr,ures,samplesize);
7741
7742
7743 printf(" slash");
7744 distr = unur_distr_slash(NULL,0);
7745 errorsum += estimate_uerror(distr,ures,samplesize);
7746
7747
7748 printf(" student");
7749 fpar[0] = 4.4;
7750 distr = unur_distr_student(fpar,1);
7751 errorsum += estimate_uerror(distr,ures,samplesize);
7752
7753
7754 printf(" triangular");
7755 fpar[0] = 0.7;
7756 distr = unur_distr_triangular(fpar,1);
7757 errorsum += estimate_uerror(distr,ures,samplesize);
7758
7759
7760 printf(" uniform");
7761 fpar[0] = 1.;
7762 fpar[1] = 2.;
7763 distr = unur_distr_uniform(fpar,2);
7764 errorsum += estimate_uerror(distr,ures,samplesize);
7765
7766
7767 printf(" weibull");
7768 fpar[0] = 1.;
7769 fpar[1] = 2.;
7770 distr = unur_distr_weibull(fpar,2);
7771 errorsum += estimate_uerror(distr,ures,samplesize);
7772
7773
7774 /*---------------------------------------------------------------------------*/
7775
7776 /* test finished */
7777 FAILED = (errorsum < 2) ? 0 : 1;
7778
7779
7780
7781 /* timing */
7782 stopwatch_print(TESTLOG,"\n<*>time = %.3f ms\n\n", stopwatch_lap(&watch));
7783
7784 /* test finished */
7785 test_ok &= (FAILED) ? 0 : 1;
7786 (FAILED) ? printf(" ==> failed] ") : printf(" ==> ok] ");
7787
7788 } /* end of test_special() */
7789
7790
7791 /*---------------------------------------------------------------------------*/
7792 /* run generator in verifying mode */
7793
run_verify_generator(FILE * LOG,int line,UNUR_PAR * par)7794 void run_verify_generator( FILE *LOG, int line, UNUR_PAR *par )
7795 {
7796 UNUR_GEN *gen;
7797 int i;
7798
7799 /* switch to verifying mode */
7800 unur_cstd_set_verify(par,1);
7801
7802 /* initialize generator */
7803 gen = unur_init( par ); abort_if_NULL(LOG, line, gen);
7804
7805 /* run generator */
7806 for (i=0; i<VIOLATE_SAMPLE_SIZE; i++)
7807 unur_sample_cont(gen);
7808
7809 /* destroy generator */
7810 unur_free(gen);
7811
7812 } /* end of run_verify_generator() */
7813
unur_cstd_set_verify(UNUR_PAR * par ATTRIBUTE__UNUSED,int verify ATTRIBUTE__UNUSED)7814 int unur_cstd_set_verify(UNUR_PAR *par ATTRIBUTE__UNUSED, int verify ATTRIBUTE__UNUSED) {return 0;}
7815
7816 /*---------------------------------------------------------------------------*/
7817
main(void)7818 int main(void)
7819 {
7820 unsigned long seed;
7821 char *str_seed, *str_tail;
7822
7823 /* start stop watch */
7824 stopwatch_init();
7825 stopwatch_start(&watch);
7826
7827 /* open log file for unuran and set output stream for unuran messages */
7828 UNURANLOG = fopen( "t_cstd_unuran.log","w" );
7829 abort_if_NULL( stderr,-1, UNURANLOG );
7830 unur_set_stream( UNURANLOG );
7831
7832 /* open log file for testing */
7833 TESTLOG = fopen( "t_cstd_test.log","w" );
7834 abort_if_NULL( stderr,-1, TESTLOG );
7835
7836 /* seed for uniform generators */
7837
7838 /* seed set by environment */
7839 str_seed = getenv("SEED");
7840
7841 if (str_seed != NULL) {
7842 seed = strtol(str_seed, &str_tail, 10);
7843 if (seed == 0u)
7844 seed = 576695;
7845 }
7846 else {
7847 #ifdef SEED
7848 seed = SEED;
7849 #else
7850 seed = 576695;
7851 #endif
7852 }
7853
7854 /* seed build-in uniform generators */
7855 unur_urng_MRG31k3p_seed(NULL,seed);
7856 unur_urng_fish_seed(NULL,seed);
7857 unur_urng_mstd_seed(NULL,seed);
7858
7859 /* seed uniform random number generator */
7860 #ifdef UNUR_URNG_UNURAN
7861 # ifdef UNUR_URNG_DEFAULT_RNGSTREAM
7862 {
7863 unsigned long sa[6];
7864 int i;
7865 for (i=0; i<6; i++) sa[i] = seed;
7866 RngStream_SetPackageSeed(sa);
7867 }
7868 # else
7869 if (unur_urng_seed(NULL,seed) != UNUR_SUCCESS) {
7870 fprintf(stderr,"WARNING: Seed could not be set at random\n");
7871 seed = ~0u;
7872 }
7873 # endif /* UNUR_URNG_DEFAULT_RNGSTREAM */
7874 #endif /* UNUR_URNG_UNURAN */
7875
7876 /* set default debugging flag */
7877 unur_set_default_debug(UNUR_DEBUG_ALL);
7878
7879 /* detect required check mode */
7880 fullcheck = (getenv("UNURANFULLCHECK")==NULL) ? FALSE : TRUE;
7881
7882 /* write header into log file */
7883 print_test_log_header( TESTLOG, seed, fullcheck );
7884
7885 /* set timer for sending SIGALRM signal */
7886 set_alarm(TESTLOG);
7887
7888 /* start test */
7889 printf("cstd: ");
7890
7891 /* run tests */
7892 test_new();
7893 test_set();
7894 test_chg();
7895 test_init();
7896 test_reinit();
7897 test_sample();
7898 test_validate();
7899 test_special();
7900
7901
7902 /* test finished */
7903 printf("\n"); fflush(stdout);
7904
7905 /* close log files */
7906 fprintf(TESTLOG,"\n====================================================\n\n");
7907 if (test_ok)
7908 fprintf(TESTLOG,"All tests PASSED.\n");
7909 else
7910 fprintf(TESTLOG,"Test(s) FAILED.\n");
7911
7912 /* timing */
7913 stopwatch_print(TESTLOG,"\n<*>total time = %.0f ms\n\n", stopwatch_stop(&watch));
7914
7915 fclose(UNURANLOG);
7916 fclose(TESTLOG);
7917
7918 /* free memory */
7919 compare_free_memory();
7920 unur_urng_free(unur_get_default_urng());
7921 unur_urng_free(unur_get_default_urng_aux());
7922
7923 /* exit */
7924 exit( (test_ok) ? EXIT_SUCCESS : EXIT_FAILURE );
7925
7926 } /* end of main */
7927
7928