Пример #1
0
def rand():
    """
    Returns an ``mpf`` with value chosen randomly from `[0, 1)`.
    The number of randomly generated bits in the mantissa is equal
    to the working precision.
    """
    return make_mpf(mpf_rand(mp.prec))
Пример #2
0
def rand():
    """Return an mpf chosen randomly from [0, 1)."""
    return make_mpf(mpf_rand(mp.prec))