Implementation for Boost.Bernoulli