over the interval <span class="MathJax_Preview"><img src="help_cubBayesNet_g_eq01259287712589338854.png" alt="$[0,1]^2$"></span><script type="math/tex">[0,1]^2</script> with parameters: order=2, abstol=0.001, relTol=0.01</p><pre class="codeinput">dim=2; absTol=1e-3; relTol=1e-2;
normsqd = @(t) sum(t.*t,2); <span class="comment">%squared l_2 norm of t</span>
replaceZeros = @(t) (t+(t==0)*eps); <span class="comment">% to avoid getting infinity, NaN</span>
yinv = @(t)(erfcinv( replaceZeros(abs(t)) ));
ft = @(t