* Simplify bernoulli. The orginal was somewhat overoptimized.