/* func3.c Last Modified 10/17/98 */ /* Integrand for I.S. example. */ #include double func3(double *x) { double k; double y; k=3.41; /* 'normalizing' constant */ if ((x[0]<=0)||(x[0]>=1)){ y=0; } else if ((x[1]<=0)||(x[1]>=1)){ y=0; } else if ((x[2]<=0)||(x[2]>=1)){ y=0; } else if ((x[3]<=0)||(x[3]>=1)){ y=0; } else if ((x[4]<=0)||(x[4]>=1)){ y=0; } else{ y=67*log((k*((1-x[0])*(1-x[1])*x[3] + x[2]*(1-x[3])))) + 28*log((k*((1-x[0])*x[1]*x[3] + (1-x[2])*(1-x[3])))) + 31*log((k*(x[0]*(1-x[1])*x[3]))) + 65*log((k*(x[0]*x[1]*x[3]))) + 34*log((k*((1-x[0])*(1-x[1])*x[4] + x[2]*(1-x[4])))) + 14*log((k*((1-x[0])*x[1]*x[4] + (1-x[2])*(1-x[4])))) + 24*log((k*(x[0]*(1-x[1])*x[4]))) + 54*log((k*(x[0]*x[1]*x[4]))) + 17*log((k*x[0])) + log(k*(1-x[0])) + 2*log((k*x[1])) + 3*log((k*x[2])); y=exp(y); } return(y); } /* end of lfunc */