Log-space probability of a log-space probability not occurring

202 Views Asked by At

Normally the probability of some probability $p$ not occurring would be $1-p$. However, I'm working with very small probabilities and therefore must work with $p$ in $\log$ space (Ie. I'm working with values of $\log(p)$ rather than $p$, otherwise I would receive an underflow error).

How do I find the value of log(1-p) without converting p back to base 10? (Ie. without first calculating 10^log(p)).

1

There are 1 best solutions below

1
On

If $p$ is very small then $\log (1 - p) \simeq -p$ will also be very small, so you'll get underflow. How are you going to avoid that underflow?