# file "RMCint" g = function(x,y) { cos(sqrt(x*y)) } M = 1000 xlist = runif(M) ylist = runif(M) funclist = g(xlist,ylist) print( mean(funclist) ) print( sd(funclist) / sqrt(M) )