# file "RMCint3" h = function(x,y) { exp(-y^2) * cos(sqrt(x*y)) } M = 1000 xlist = runif(M) ylist = rexp(M) funclist = exp(ylist) * h(xlist,ylist) print( mean(funclist) ) print( sd(funclist) / sqrt(M) )