Robert Kern <robert.kern at gmail.com> writes: > > I usually owuld write that as int(ceil(log(U, 1.0 - p))). > Knock yourself out. I was cribbing from my C implementation in numpy. Oh cool, I thought you were pasting from a Python implementation. No prob.