TITLE: Holomorphic extensions of a non-vanishing real-analytic function
QUESTION [5 upvotes]: Let f(z) be a holomorphic function defined on an open neighborhood $R$
of the interval $I=[0,1]\subset \mathbb{R}$. Assume $f$
does not vanish on $I$. Then $g(x) = |f(x)|$ is a real-analytic
function on $I$, and thus extends to a holomorphic function $g$ on
some neighborhood of $R'\subset R$ of $I$.
Now, $g$ does not necessarily extend to all of $R$. Take, for
instance, $f(z) = z + i$, which is of course entire. Then $g(x) = |f(x)| =
\sqrt{x^2+1}$ cannot be extended to any domain including $-i$, as then
we hit the branch point of the square-root function at $0$.
May we actually construct a region $R'$ where $g$ is guaranteed to be
holomorphic, given $R$ and, say, a lower bound on $(\min_{x\in I}
|f(x))/(\max_{x\in I} |f(x)|)$? If not, what other conditions could be helpful?
Added remark: what if we have a lower bound on $\frac{\min_{z\in R} |f(z)|}{\max_{z\in R} |f(z)|}$?
Note: the question came out of a conversation with F. Johannson. The added remark is also his.

REPLY [4 votes]: To say something about the size of $R'$, you need a bound for the distance of the nearest zero to the real line. Such a bound can be obtained if your conditions on
your function define a normal family in $R$. No reasonable condition involving only restriction of $f$ on $I$ will do this. However one can
give bounds in terms of $K:=\min_I|f|/\max_R|f|$.
Namely, there exists $\delta>0$ which depends on $K$ and $R$, such that $f$ has
no zero in a $\delta$-neighborhood of $I$. To give an explicit estimate
of this $\delta$ one needs to know the shape of $R$. 
To obtain an explicit estimate, you may argue as follows. Let $f$ be a function in the unit disk. $|f(z)|\leq 1$, and $|f(0)|\geq K$.
Then by Cauchy, $|f'(z)|\leq 4, |z|\leq 1/2,$ so
$$|f(z)-f(0)|\leq 4|z|,\quad |z|\leq 1/2,$$
so 
$$|f(z)|\geq K-4\delta\quad |z|\leq\delta<1/2.$$
taking $\delta<K/4$ you obtain that $f$ has no zeros in the disk of radius
$K/4$. Of course this can be improved, depending on your needs.