Random bounded Pareto variates.

def rtruncated_pareto(alpha, m, b, size=None):
    """
    Random bounded Pareto variates.
    """
    u = random_number(size)
    return (-(u * b ** alpha - u * m ** alpha - b ** alpha) /
            (b ** alpha * m ** alpha)) ** (-1. / alpha)