Robert Kern <robert.kern at gmail.com> writes: > G = int(ceil(log(U) / log(1.0 - p))) I usually owuld write that as int(ceil(log(U, 1.0 - p))).