double fcn(double x, double y) { const double data[50] = { 0.9997,0.1629,0.2826,0.9472,0.2317,0.4850,0.9575,0.7443,0.5400,0.7400, 0.7599,0.6586,0.3156,0.8044,0.5197,0.1686,0.4755,0.3923,0.2217,0.2132, 0.0303,0.3335,0.1941,0.9437,0.5799,0.8983,0.6656,0.4986,0.5606,0.1823, 0.2965,0.1174,0.0629,0.6481,0.7254,0.6371,0.7139,0.0996,0.6993,0.1078, 0.1292,0.5024,0.2078,0.2889,0.0832,0.1281,0.5474,0.0823,0.2921,0.8916}; double f = 0.; for (int i=0; i<50; i++) { double p = x*y*pow(1.-data[i],2)+ (1.-x)*y*2.*data[i]*(1.-data[i])+ (1.-y)*2.*pow(data[i],2); f += log(p); } return -2.*f; }