#############################################################################

[main]

[main - data:]

# method
method: ITDR

[main - header:]

/* prototypes */
/* pdf of gamma density (a=1/2) */
double pdf_gamma12( double x, const UNUR_DISTR *distr );
double dpdf_gamma12( double x, const UNUR_DISTR *distr );

int unur_itdr_set_pedantic( struct unur_par *par, int pedantic );

\#define COMPARE_SAMPLE_SIZE   (10000)
\#define VIOLATE_SAMPLE_SIZE   (20)

/* \#define SEED   (298346) */

#############################################################################

[new]

[new - invalid NULL ptr: 
   distr = NULL; ]

~( distr );
	--> expected_NULL --> UNUR_ERR_NULL

[new - invalid distribution type:
   distr = unur_distr_discr_new(); ]

~( distr );
	--> expected_NULL --> UNUR_ERR_DISTR_INVALID

[new - data missing in distribution object:
   distr = unur_distr_cont_new(); ]

/* pdf, mode (pole) */
~( distr );
	--> expected_NULL --> UNUR_ERR_DISTR_REQUIRED

[new - data missing in distribution object:
   distr = unur_distr_cont_new(); 
   unur_distr_cont_set_pdf(distr, pdf_gamma12); ]

/* mode (pole) */
~( distr );
	--> expected_NULL --> UNUR_ERR_DISTR_REQUIRED

#############################################################################

[set]

[set - invalid NULL ptr: 
   par = NULL; ]

~_verify( par, 1 );
	--> expected_setfailed --> UNUR_ERR_NULL

~_xi(par,1.);
	--> expected_setfailed --> UNUR_ERR_NULL

~_cp(par, -0.5);
	--> expected_setfailed --> UNUR_ERR_NULL

~_ct(par, -0.5);
	--> expected_setfailed --> UNUR_ERR_NULL


[set - invalid parameter object:
   double fpar[2] = {0.,1.};
   distr = unur_distr_normal(fpar,2);
   par = unur_arou_new(distr); ]

~_verify( par, 1 );
	--> expected_setfailed --> UNUR_ERR_PAR_INVALID

~_xi(par,1.);
	--> expected_setfailed --> UNUR_ERR_PAR_INVALID

~_cp(par, -0.5);
	--> expected_setfailed --> UNUR_ERR_PAR_INVALID

~_ct(par, -0.5);
	--> expected_setfailed --> UNUR_ERR_PAR_INVALID

unur_par_free(par);


[set - invalid parameters:
   double fpar[1] = {0.5};
   distr = unur_distr_gamma(fpar,1);
   par = unur_itdr_new(distr); ]

~_xi(par,-1.);
	--> expected_setfailed --> UNUR_ERR_PAR_SET

~_cp(par, 0.5);
	--> expected_setfailed --> UNUR_ERR_PAR_SET

~_cp(par, -1.0);
	--> expected_setfailed --> UNUR_ERR_PAR_SET

~_ct(par, 0.5);
	--> expected_setfailed --> UNUR_ERR_PAR_SET

~_ct(par, -1.0);
	--> expected_setfailed --> UNUR_ERR_PAR_SET

unur_par_free(par);


#############################################################################

[get]

[get - invalid NULL ptr: 
   gen = NULL; ]

~_xi(gen)
	--> expected_INFINITY --> UNUR_ERR_NULL

~_cp(gen)
	--> expected_INFINITY --> UNUR_ERR_NULL

~_ct(gen)
	--> expected_INFINITY --> UNUR_ERR_NULL

~_area(gen)
	--> expected_INFINITY --> UNUR_ERR_NULL


[get - invalid generator object:
   distr = unur_distr_normal(NULL,0);
   par = unur_arou_new(distr);
   gen = unur_init(par); <-- ! NULL ]

~_xi(gen)
	--> expected_INFINITY --> UNUR_ERR_GEN_INVALID

~_cp(gen)
	--> expected_INFINITY --> UNUR_ERR_GEN_INVALID

~_ct(gen)
	--> expected_INFINITY --> UNUR_ERR_GEN_INVALID

~_area(gen)
	--> expected_INFINITY --> UNUR_ERR_GEN_INVALID

#############################################################################

[chg]

[chg - invalid NULL ptr: 
   gen = NULL; ]

~_verify( gen, 1 );
	--> expected_setfailed --> UNUR_ERR_NULL

[chg - invalid generator object:
   distr = unur_distr_normal(NULL,0);
   par = unur_arou_new(distr);
   gen = unur_init(par); <-- ! NULL ]

~_verify( gen, 1 );
	--> expected_setfailed --> UNUR_ERR_GEN_INVALID



#############################################################################

[init]

[init - invalid NULL ptr: 
   par = NULL; ]

unur_init( par );
	--> expected_NULL --> UNUR_ERR_NULL

[init - data missing in distribution object:
   distr = unur_distr_cont_new();
   par = NULL; ]

/* dpdf, mode */
unur_distr_cont_set_pdf(distr,pdf_gamma12);
par = unur_itdr_new( distr );
	--> expected_NULL --> UNUR_ERR_DISTR_REQUIRED

/* mode */
unur_distr_cont_set_dpdf(distr,dpdf_gamma12);
par = unur_itdr_new( distr );
	--> expected_NULL --> UNUR_ERR_DISTR_REQUIRED

unur_distr_cont_set_mode(distr,0.);
par = unur_itdr_new( distr );
	--> expected_NULL --> UNUR_ERR_DISTR_PROP


#############################################################################

[reinit]

[reinit - does not exist:
   double fpm[] = { 0.8 };
   distr = unur_distr_gamma(fpm,1); 
   par = unur_itdr_new(distr);
   gen = unur_init( par ); <-- ! NULL ]

unur_reinit( gen );
	--> expected_reinit

#############################################################################

[sample]

[sample - compare:
   double fpm[] = { 0.8, 1., 1. };
   distr = unur_distr_gamma(fpm,3); 
   par = NULL; ]

/* default algorithm */
par = unur_itdr_new(distr);
	-->compare_sequence_par_start

/* default algorithm - verifying mode */
par = unur_itdr_new(distr);
unur_itdr_set_verify(par,1);
	-->compare_sequence_par

#.....................................................................

[sample - compare:
   double xi, cp, ct;
   double fpm[] = { 0.8, 1., 1. };
   distr = unur_distr_gamma(fpm,3); 
   par = NULL; 
   gen = NULL; ]

/* default algorithm */
par = unur_itdr_new(distr);
gen = unur_init(par);
	-->compare_sequence_gen_start

/* set bx, ct and cp */
xi = unur_itdr_get_xi(gen);
ct = unur_itdr_get_ct(gen);
cp = unur_itdr_get_cp(gen);
unur_free(gen);
par = unur_itdr_new(distr);
unur_itdr_set_xi(par,xi);
unur_itdr_set_cp(par,cp);
unur_itdr_set_ct(par,ct);
gen = unur_init(par);
	-->compare_sequence_gen

#.....................................................................

[sample - compare:
   double xi, cp, ct;
   double fpm[] = { 0.3, 1., 1. };
   distr = unur_distr_gamma(fpm,3); 
   par = NULL; 
   gen = NULL; ]

/* default algorithm */
par = unur_itdr_new(distr);
gen = unur_init(par);
	-->compare_sequence_gen_start

/* set bx, ct and cp */
xi = unur_itdr_get_xi(gen);
ct = unur_itdr_get_ct(gen);
cp = unur_itdr_get_cp(gen);
unur_free(gen);
par = unur_itdr_new(distr);
unur_itdr_set_xi(par,xi);
unur_itdr_set_cp(par,cp);
unur_itdr_set_ct(par,ct);
gen = unur_init(par);
	-->compare_sequence_gen

#.....................................................................

[sample - compare:
   double xi, cp, ct;
   double fpm[] = { 3., 0.3, 1., 2. };
   distr = unur_distr_beta(fpm,4); 
   par = NULL; 
   gen = NULL; ]

/* default algorithm */
par = unur_itdr_new(distr);
gen = unur_init(par);
	-->compare_sequence_gen_start

/* set bx, ct and cp */
xi = unur_itdr_get_xi(gen);
ct = unur_itdr_get_ct(gen);
cp = unur_itdr_get_cp(gen);
unur_free(gen);
par = unur_itdr_new(distr);
unur_itdr_set_xi(par,xi);
unur_itdr_set_cp(par,cp);
unur_itdr_set_ct(par,ct);
gen = unur_init(par);
	-->compare_sequence_gen

#.....................................................................

[sample - compare clone:
   UNUR_GEN *clone;
   double fpm[] = { 0.3, 1., 1. };
   distr = unur_distr_gamma(fpm,3); 
   par = NULL; 
   gen = NULL; ]

/* original generator object */
par = unur_itdr_new(distr);
gen = unur_init(par);
	-->compare_sequence_gen_start

/* clone */
clone = unur_gen_clone(gen);
unur_free(gen);
gen = clone;
	-->compare_sequence_gen

#.....................................................................

[sample - compare reinit:
   double fpm[] = { 0.8 };
   distr = unur_distr_gamma(fpm,1); 
   par = NULL;
   gen = NULL; ]

/* original generator object */
par = unur_itdr_new(distr);
gen = unur_init(par);
        -->compare_sequence_gen_start

/* reinit */
unur_reinit(gen);
        -->compare_sequence_gen

#.....................................................................

[sample - compare stringparser:
   double fpar[] = { 0.3, 1., 1. };
   distr = NULL;
   par = NULL;
   gen = NULL; ]

distr = unur_distr_gamma(fpar,3);
par = unur_itdr_new(distr);
unur_itdr_set_xi(par,1.3);
unur_itdr_set_cp(par,-0.7);
unur_itdr_set_ct(par,-0.3);
unur_itdr_set_verify(par,TRUE);
gen = unur_init(par);
	-->compare_sequence_gen_start

unur_free(gen); gen = NULL;
unur_distr_free(distr); distr = NULL;
gen = unur_str2gen( "gamma(0.3,1.,1.) & \
          method = itdr; xi = 1.3; cp = -0.7; ct = -0.3; verify" );
	-->compare_sequence_gen

#############################################################################

[validate]

[validate - generators:]

# default program
par[0] = unur_itdr_new(@distr@);

# set xi, cp, and ct  for gamm(0.1)
par[1] = unur_itdr_new(@distr@);
unur_itdr_set_xi(par,0.1);
unur_itdr_set_cp(par,-0.9);
unur_itdr_set_ct(par,-0.54);

# set xi, cp, and ct  for gamm(0.5)
par[2] = unur_itdr_new(@distr@);
unur_itdr_set_xi(par,0.5);
unur_itdr_set_cp(par,-0.5);
unur_itdr_set_ct(par,-0.5);

# default variant but reinitialized with changed domain
{ UNUR_DISTR *dg =NULL;
par[3] = unur_itdr_new(@distr@);
dg = unur_get_distr(gen);
unur_distr_cont_set_domain(dg,0.2,0.99);
unur_distr_cont_upd_pdfarea(dg);
unur_distr_cont_upd_mode(dg);
unur_reinit(gen); }

# default variant but reinitialized with changed pdf parameters
{ UNUR_DISTR *dg =NULL;
par[4] = unur_itdr_new(@distr@);
fpm[0] = 0.5;
fpm[1] = 4.;
dg = unur_get_distr(gen);
unur_distr_cont_set_pdfparams(dg,fpm,2);
unur_distr_cont_upd_pdfarea(dg);
unur_distr_cont_upd_mode(dg);
unur_reinit(gen); }


[validate - distributions:]

# Gamma distributions
fpm[0] = 0.1;
distr[0] = unur_distr_gamma(fpm,1);

fpm[0] = 0.1;
distr[1] = unur_distr_gamma_wo_logpdf(fpm,1);

fpm[0] = 0.5;
distr[2] = unur_distr_gamma(fpm,1);

fpm[0] = 0.5;
distr[3] = unur_distr_gamma_wo_logpdf(fpm,1);

fpm[0] = 0.9;
distr[4] = unur_distr_gamma(fpm,1);

fpm[0] = 0.9;
distr[5] = unur_distr_gamma_wo_logpdf(fpm,1);

fpm[0] = 1.;
distr[6] = unur_distr_gamma(fpm,1);

fpm[0] = 1.;
distr[7] = unur_distr_gamma_wo_logpdf(fpm,1);

fpm[0] = 2.;
distr[8] = unur_distr_gamma(fpm,1);

fpm[0] = 2.;
distr[9] = unur_distr_gamma_wo_logpdf(fpm,1);

fpm[0] = 0.5;
fpm[1] = 2.;
fpm[2] = 1.;
distr[10] = unur_distr_gamma(fpm,3);

fpm[0] = 0.5;
fpm[1] = 2.;
fpm[2] = 1.;
distr[11] = unur_distr_gamma_wo_logpdf(fpm,3);

fpm[0] = 0.5;
fpm[1] = 2.;
fpm[2] = -1.;
distr[12] = unur_distr_gamma(fpm,3);

fpm[0] = 0.5;
fpm[1] = 2.;
fpm[2] = -1.;
distr[13] = unur_distr_gamma_wo_logpdf(fpm,3);

fpm[0] = 0.5;
fpm[1] = 1.;
fpm[2] = 1.;
distr[14] = unur_distr_gamma(fpm,3);
unur_distr_cont_set_domain(distr[14],1.,1.1);

fpm[0] = 0.5;
fpm[1] = 1.;
fpm[2] = 1.;
distr[15] = unur_distr_gamma_wo_logpdf(fpm,3);
unur_distr_cont_set_domain(distr[15],1.,1.1);

fpm[0] = 0.5;
fpm[1] = 1.;
fpm[2] = 1.;
distr[16] = unur_distr_gamma(fpm,3);
unur_distr_cont_set_domain(distr[16],1.,2.);

fpm[0] = 0.5;
fpm[1] = 1.;
fpm[2] = 1.;
distr[17] = unur_distr_gamma_wo_logpdf(fpm,3);
unur_distr_cont_set_domain(distr[17],1.,2.);

fpm[0] = 0.5;
fpm[1] = 1.;
fpm[2] = 1.;
distr[18] = unur_distr_gamma(fpm,3);
unur_distr_cont_set_domain(distr[18],1.,4.);

fpm[0] = 0.5;
fpm[1] = 1.;
fpm[2] = 1.;
distr[19] = unur_distr_gamma_wo_logpdf(fpm,3);
unur_distr_cont_set_domain(distr[19],1.,4.);

fpm[0] = 1.5;
distr[48] = unur_distr_gamma(fpm,1);
unur_distr_cont_set_domain(distr[48],1.,UNUR_INFINITY);

fpm[0] = 1.5;
distr[49] = unur_distr_gamma_wo_logpdf(fpm,1);
unur_distr_cont_set_domain(distr[49],1.,UNUR_INFINITY);

# Normal distributions
distr[20] = unur_distr_normal(NULL,0);

distr[21] = unur_distr_normal_wo_logpdf(NULL,0);

distr[22] = unur_distr_normal(NULL,0);
unur_distr_cont_set_domain(distr[22],0.,UNUR_INFINITY);

distr[23] = unur_distr_normal_wo_logpdf(NULL,0);
unur_distr_cont_set_domain(distr[23],0.,UNUR_INFINITY);

distr[24] = unur_distr_normal(NULL,0);
unur_distr_cont_set_domain(distr[24],0.,4.);

distr[25] = unur_distr_normal_wo_logpdf(NULL,0);
unur_distr_cont_set_domain(distr[25],0.,4.);

distr[26] = unur_distr_normal(NULL,0);
unur_distr_cont_set_domain(distr[26],1.,4.);

distr[27] = unur_distr_normal_wo_logpdf(NULL,0);
unur_distr_cont_set_domain(distr[27],1.,4.);

distr[28] = unur_distr_normal(NULL,0);
unur_distr_cont_set_domain(distr[28],-0.5,4.);
unur_distr_cont_set_mode(distr[28],-0.5);

distr[29] = unur_distr_normal_wo_logpdf(NULL,0);
unur_distr_cont_set_domain(distr[29],-0.5,4.);
unur_distr_cont_set_mode(distr[29],-0.5);

# Cauchy distributions
distr[30] = unur_distr_cauchy(NULL,0);

distr[31] = unur_distr_cauchy_wo_logpdf(NULL,0);

distr[32] = unur_distr_cauchy(NULL,0);
unur_distr_cont_set_domain(distr[32],0.,UNUR_INFINITY);

distr[33] = unur_distr_cauchy_wo_logpdf(NULL,0);
unur_distr_cont_set_domain(distr[33],0.,UNUR_INFINITY);

distr[34] = unur_distr_cauchy(NULL,0);
unur_distr_cont_set_domain(distr[34],0.,4.);

distr[35] = unur_distr_cauchy_wo_logpdf(NULL,0);
unur_distr_cont_set_domain(distr[35],0.,4.);

distr[36] = unur_distr_cauchy(NULL,0);
unur_distr_cont_set_domain(distr[36],1.,4.);

distr[37] = unur_distr_cauchy_wo_logpdf(NULL,0);
unur_distr_cont_set_domain(distr[37],1.,4.);

distr[38] = unur_distr_cauchy(NULL,0);
unur_distr_cont_set_domain(distr[38],-0.5,4.);
unur_distr_cont_set_mode(distr[38],-0.5);

distr[39] = unur_distr_cauchy_wo_logpdf(NULL,0);
unur_distr_cont_set_domain(distr[39],-0.5,4.);
unur_distr_cont_set_mode(distr[39],-0.5);

# Beta distributions
fpm[0] = 0.5;
fpm[1] = 3.;
distr[40] = unur_distr_beta(fpm,2);

fpm[0] = 0.5;
fpm[1] = 3.;
distr[41] = unur_distr_beta_wo_logpdf(fpm,2);

fpm[0] = 0.5;
fpm[1] = 3.;
fpm[2] = 1.;
fpm[3] = 2.;
distr[42] = unur_distr_beta(fpm,4);

fpm[0] = 0.5;
fpm[1] = 3.;
fpm[2] = 1.;
fpm[3] = 2.;
distr[43] = unur_distr_beta_wo_logpdf(fpm,4);

fpm[0] = 3.;
fpm[1] = 0.5;
fpm[2] = -1.;
fpm[3] = 0.;
distr[44] = unur_distr_beta(fpm,4);

fpm[0] = 3.;
fpm[1] = 0.5;
fpm[2] = -1.;
fpm[3] = 0.;
distr[45] = unur_distr_beta_wo_logpdf(fpm,4);

fpm[0] = 3.;
fpm[1] = 0.5;
distr[46] = unur_distr_beta(fpm,2);

fpm[0] = 3.;
fpm[1] = 0.5;
distr[47] = unur_distr_beta_wo_logpdf(fpm,2);

# F distributions
fpm[0] = 1.;
fpm[1] = 5.;
distr[50] = unur_distr_F(fpm,2);

fpm[0] = 1.99;
fpm[1] = 5.;
distr[51] = unur_distr_F(fpm,2);

fpm[0] = 0.1;
fpm[1] = 5.;
distr[52] = unur_distr_F(fpm,2);

# number of distributions: 53


[validate - test chi2:]

#  + ... pass test
#  0 ... fail to initialize generator
#  - ... fail test
#  . ... do not run test
#  # ... comment
#
# generators:
#  [0] ... default
#  [1] ... set xi, cp, and ct for gamm(0.1)
#  [2] ... set xi, cp, and ct for gamm(0.5)
#  [3] ... default variant but reinitialized with changed domain (0.2,0.99)
#  [4] ... default variant but reinitialized with changed pdf parameters (0.5, 4.)
# 
#gen	0  1  2  3  4	# distribution
#---------------------------------------------
  <0>	+  +  .  +  +	# gamma(0.1)
  <2>	+  .  +  +  +	# gamma(0.5)
  <4>	+  .  .  +  +	# gamma(0.9)
  <6>	+  .  .  +  +	# gamma(1.)
  <8>	0  .  .  .  .	# gamma(2.)
 <10>	+  .  .  -  +	# gamma(0.5,2.,1.)
 <12>	+  .  .  +  +	# gamma(0.5,2.,-1.)
 <14>	+  .  .  -  +	# gamma(0.5,1.,1.), domain=(1.,1.1)
 <16>	+  .  .  -  +	# gamma(0.5,1.,1.), domain=(1.,2.)
 <18>	+  .  .  -  +	# gamma(0.5,1.,1.), domain=(1.,4.)
 <48>	+  .  .  -  +	# gamma(1.5), domain=(1.,inf)
  <1>	+  +  .  +  +	# gamma(0.1), w/o logpdf
  <3>	+  .  +  +  +	# gamma(0.5), w/o logpdf
  <5>	+  .  .  +  +	# gamma(0.9), w/o logpdf
  <7>	+  .  .  +  +	# gamma(1.), w/o logpdf
  <9>	0  .  .  .  .	# gamma(2.), w/o logpdf
 <11>	+  .  .  -  +	# gamma(0.5,2.,1.), w/o logpdf
 <13>	+  .  .  +  +	# gamma(0.5,2.,-1.), w/o logpdf
 <15>	+  .  .  -  +	# gamma(0.5,1.,1.), domain=(1.,1.1), w/o logpdf
 <17>	+  .  .  -  +	# gamma(0.5,1.,1.), domain=(1.,2.), w/o logpdf
 <19>	+  .  .  -  +	# gamma(0.5,1.,1.), domain=(1.,4.), w/o logpdf
 <49>	+  .  .  -  +	# gamma(1.5), domain=(1.,inf), w/o logpdf
 <20>	0  .  .  .  .	# normal()
 <22>	+  .  .  +  -	# normal(), domain=(0.,inf)
 <24>	+  .  .  +  -	# normal(), domain=(0.,4.)
 <26>	+  .  .  +  +	# normal(), domain=(1.,4.)
 <28>	0  .  .  .  .	# normal(), domain=(-0.5,4.)
 <21>	0  .  .  .  .	# normal(), w/o logpdf
 <23>	+  .  .  +  -	# normal(), domain=(0.,inf), w/o logpdf
 <25>	+  .  .  +  -	# normal(), domain=(0.,4.), w/o logpdf
 <27>	+  .  .  +  +	# normal(), domain=(1.,4.), w/o logpdf
 <29>	0  .  .  .  .	# normal(), domain=(-0.5,4.), w/o logpdf
 <30>	0  .  .  .  .	# cauchy()
 <32>	+  .  .  +  -	# cauchy(), domain=(0.,inf)
 <34>	+  .  .  +  -	# cauchy(), domain=(0.,4.)
 <36>	+  .  .  +  +	# cauchy(), domain=(1.,4.)
 <38>	0  .  .  .  .	# cauchy(), domain=(-0.5,4.)
 <31>	0  .  .  .  .	# cauchy(), w/o logpdf
 <33>	+  .  .  +  -	# cauchy(), domain=(0.,inf), w/o logpdf
 <35>	+  .  .  +  -	# cauchy(), domain=(0.,4.), w/o logpdf
 <37>	+  .  .  +  +	# cauchy(), domain=(1.,4.), w/o logpdf
 <39>	0  .  .  .  .	# cauchy(), domain=(-0.5,4.), w/o logpdf
 <40>	+  .  .  +  +	# beta(0.5,3.)
 <42>	+  .  .  -  +	# beta(0.5,3.; 1.,2.)
 <44>	+  .  .  -  +	# beta(3.,0.5; -1.,0.)
 <46>	+  .  .  +  +	# beta(3.,0.5)
 <41>	+  .  .  +  +	# beta(0.5,3.), w/o logpdf
 <43>	+  .  .  -  +	# beta(0.5,3.; 1.,2.), w/o logpdf
 <45>	+  .  .  -  +	# beta(3.,0.5; -1.,0.), w/o logpdf
 <47>	+  .  .  +  +	# beta(3.,0.5), w/o logpdf
 <50>   +  .  .  +  +	# F (1,5)
 <51>   +  .  .  +  +	# F (1.99,5)
 <52>   +  .  .  +  +	# F (0.1,5)


[validate - verify hat:]

#  + ... pass test
#  ~ ... fail in at most 1% of samples
#  0 ... fail to initialize generator
#  - ... fail test
#  . ... do not run test
#  # ... comment
#
# generators:
#  [0] ... default
#  [1] ... set xi, cp, and ct for gamm(0.1)
#  [2] ... set xi, cp, and ct for gamm(0.5)
#  [3] ... default variant but reinitialized with changed domain (0.2,0.99)
#  [4] ... default variant but reinitialized with changed pdf parameters (0.5, 4.)
# 
#gen	0  1  2  3  4	# distribution
#---------------------------------------------
  <0>	+  +  .  +  +	# gamma(0.1)
  <2>	+  .  +  +  +	# gamma(0.5)
  <4>	+  .  .  +  +	# gamma(0.9)
  <6>	+  .  .  +  +	# gamma(1.)
  <8>	0  .  .  .  .	# gamma(2.)
 <10>	+  .  .  -  +	# gamma(0.5,2.,1.)
 <12>	+  .  .  +  +	# gamma(0.5,2.,-1.)
 <14>	+  .  .  -  +	# gamma(0.5,1.,1.), domain=(1.,1.1)
 <16>	+  .  .  -  +	# gamma(0.5,1.,1.), domain=(1.,2.)
 <18>	+  .  .  -  +	# gamma(0.5,1.,1.), domain=(1.,4.)
 <48>	+  .  .  -  +	# gamma(1.5), domain=(1.,inf)
  <1>	+  +  .  +  +	# gamma(0.1), w/o logpdf
  <3>	+  .  +  +  +	# gamma(0.5), w/o logpdf
  <5>	+  .  .  +  +	# gamma(0.9), w/o logpdf
  <7>	+  .  .  +  +	# gamma(1.), w/o logpdf
  <9>	0  .  .  .  .	# gamma(2.), w/o logpdf
 <11>	+  .  .  -  +	# gamma(0.5,2.,1.), w/o logpdf
 <13>	+  .  .  +  +	# gamma(0.5,2.,-1.), w/o logpdf
 <15>	+  .  .  -  +	# gamma(0.5,1.,1.), domain=(1.,1.1), w/o logpdf
 <17>	+  .  .  -  +	# gamma(0.5,1.,1.), domain=(1.,2.), w/o logpdf
 <19>	+  .  .  -  +	# gamma(0.5,1.,1.), domain=(1.,4.), w/o logpdf
 <49>	+  .  .  -  +	# gamma(1.5), domain=(1.,inf), w/o logpdf
 <20>	0  .  .  .  .	# normal()
 <22>	+  .  .  +  -	# normal(), domain=(0.,inf)
 <24>	+  .  .  +  -	# normal(), domain=(0.,4.)
 <26>	+  .  .  +  +	# normal(), domain=(1.,4.)
 <28>	0  .  .  .  .	# normal(), domain=(-0.5,4.)
 <21>	0  .  .  .  .	# normal(), w/o logpdf
 <23>	+  .  .  +  -	# normal(), domain=(0.,inf), w/o logpdf
 <25>	+  .  .  +  -	# normal(), domain=(0.,4.), w/o logpdf
 <27>	+  .  .  +  +	# normal(), domain=(1.,4.), w/o logpdf
 <29>	0  .  .  .  .	# normal(), domain=(-0.5,4.), w/o logpdf
 <30>	0  .  .  .  .	# cauchy()
 <32>	+  .  .  +  -	# cauchy(), domain=(0.,inf)
 <34>	+  .  .  +  -	# cauchy(), domain=(0.,4.)
 <36>	+  .  .  +  +	# cauchy(), domain=(1.,4.)
 <38>	0  .  .  .  .	# cauchy(), domain=(-0.5,4.)
 <31>	0  .  .  .  .	# cauchy(), w/o logpdf
 <33>	+  .  .  +  -	# cauchy(), domain=(0.,inf), w/o logpdf
 <35>	+  .  .  +  -	# cauchy(), domain=(0.,4.), w/o logpdf
 <37>	+  .  .  +  +	# cauchy(), domain=(1.,4.), w/o logpdf
 <39>	0  .  .  .  .	# cauchy(), domain=(-0.5,4.), w/o logpdf
 <40>	+  .  .  +  +	# beta(0.5,3.)
 <42>	+  .  .  -  +	# beta(0.5,3.; 1.,2.)
 <44>	+  .  .  -  +	# beta(3.,0.5; -1.,0.)
 <46>	+  .  .  +  +	# beta(3.,0.5)
 <41>	+  .  .  +  +	# beta(0.5,3.), w/o logpdf
 <43>	+  .  .  -  +	# beta(0.5,3.; 1.,2.), w/o logpdf
 <45>	+  .  .  -  +	# beta(3.,0.5; -1.,0.), w/o logpdf
 <47>	+  .  .  +  +	# beta(3.,0.5), w/o logpdf
 <50>   +  .  .  +  +	# F (1,5)
 <51>   +  .  .  +  +	# F (1.99,5)
 <52>   +  .  .  +  +	# F (0.1,5)


#############################################################################
#############################################################################

[verbatim]

/* pdf of gamma density (a=1/2) */
double pdf_gamma12( double x, const UNUR_DISTR *distr ATTRIBUTE__UNUSED)
{ 
	return exp(-x)/sqrt(x);
}

double dpdf_gamma12( double x, const UNUR_DISTR *distr ATTRIBUTE__UNUSED)
{ 
	return -exp(-x)/sqrt(x) * (1.+1./(2.*x));
}


/* dummy function */
int unur_itdr_set_pedantic( struct unur_par *par ATTRIBUTE__UNUSED, int pedantic ATTRIBUTE__UNUSED)
{ return 1; }


#############################################################################
