Quadrant asymptotics of the error function (source code)

= Quadrant asymptotics of the error function
{title2=$\int_0^z e^{-t^2}dt$}

For $z=re^{i\theta}$ with fixed $0\le\theta\le\pi/2$, a horizontal tail gives $f(z)=\sqrt\pi/2-e^{-z^2}(2z)^{-1}[1+O(z^{-2})]$. The constant dominates through $\theta=\pi/4$; above that angle the exponential endpoint dominates. At the boundary angle its modulus is only $O(r^{-1})$, so the constant remains leading. On the imaginary axis the integral is purely imaginary and grows as $ie^{r^2}/(2r)$. The approximation is not a determination of exponentially subdominant constants in that growing sector.