
function s=intdouble(n)
    s=0
    for i=1:n
        for j=1:n
            x=rand()
            y=rand()
            if y < 1-x
                s=s+exp(-x*y^2)
            end
        end
    end
    s=s/n^2
endfunction

r=intdouble(100)
