예제 #1
0
파일: mptypes.py 프로젝트: gnulinooks/sympy
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))