Earlier, I asked a question on MathOverflow regarding how one might analytically approximate a function of the form: $f(n) = \prod_{i=1}^{n-1} (1-ai)$ for $a \ge 0$, $(ai) < 1$, and $n > 10^5$ or $10^6$. Robert Israel answered the question in a very nice way, observing that:
$f(n) = \dfrac{a^{n-1} \Gamma(1/a)}{\Gamma(1-n+1/a)}$
...and that one could use Stirling's series for an asymptotic approximation of $\ln(\Gamma(1-n+ 1/a))$.
My question here is: how might one actually compute values for this function (using, for example, Mathematica) for very large $n$ ($n > 10^9$ or so) and very small $a$ ($a < 10^{-30}$), without overflows/underflows, provided that the known output for $f(n)$ falls in the range of, say, $10^{-12} \le f(n) \le 1$? Are there any simple strategies for achieving this?