A better formula for this purpose--because it would be a monotonic transformation of the data, which yours is not--would simply add a small constant to each of p and 1-p, as in 0.5 * log((p + 0.001) / (1 - p + 0.001)). If your value of p is found as a ratio of counts, you would do even better by recomputing those ratios after adding a small "start" value (such as 1/6) to both the numerator and the denominator. This will prevent p from ever attaining 0 or 1.
–
whuber♦Jan 12 '14 at 18:00