Normal ratio-of-uniforms envelope (source code)

= Normal ratio-of-uniforms envelope
{title2=$0<u<1,\quad|v|\le2\sigma u\sqrt{-\log u}$}

For the unnormalized <normal density> $h(x)=e^{-x^2/(2\sigma^2)}$, the smallest axis-aligned envelope is $0<u<1$ and $|v|\le\sigma\sqrt{2/e}$. The boundary reaches that width at $u=e^{-1/2}$. Region area is $\sigma\sqrt{\pi/2}$, so the acceptance rate is $\sqrt{\pi e}/4$, independently of $\sigma$. Multiplying $h$ by a positive constant rescales both coordinates and their areas consistently.