Generate a uniform random number in the range [lo, hi)

@param lo lower limit of range
@param hi upper limit of range
@return a uniform random real in the range [lo, hi)
492059
public double nextDouble(double lo, double hi) {
        if (lo < 0) {
            if (nextInt(2) == 0)
                return -nextDouble(0, -lo);
            else
                return nextDouble(0, hi);
        } else {
            return (lo + (hi - lo) * nextDouble());
        }
    }
605057
public void addUUID( long lo, long hi ) {
    if( _ls==null || _ds== null || _sparseLen >= _ls.length )
      append2slowUUID();
    _ls[_sparseLen] = lo;
    _ds[_sparseLen++] = Double.longBitsToDouble(hi);
    _len++;
    assert _sparseLen <= _len;
  }
778566
def randint(self, a: int, b: int, n: Optional[int] = None) -> Union[List[int], int]:
        
        max_n = self.config.MAX_NUMBER_OF_INTEGERS
        return self._generate_randoms(self._request_randints, max_n=max_n, a=a, b=b, n=n)
293898
public void nextDoubles(double[] d, double lo, double hi) {
        real.nextDoubles(d);

        double l = hi - lo;        
        int n = d.length;
        for (int i = 0; i < n; i++) {
            d[i] = lo + l * d[i];
        }
    }
805081
def runiform(lower, upper, size=None):
    
    return np.random.uniform(lower, upper, size)
1156858
function(hi, lo) {
    var negate = false;
    if (arguments.length == 1) {
      if (typeof(hi) == 'number') {
        // Simplify bitfield retrieval by using abs() value.  We restore sign
        // later
        negate = hi < 0;
        hi = Math.abs(hi);
        lo = hi % VAL32;
        hi = hi / VAL32;
        if (hi > VAL32) throw new RangeError(hi  + ' is outside Int64 range');
        hi = hi | 0;
      } else if (typeof(hi) == 'string') {
        hi = (hi + '').replace(/^0x/, '');
        lo = hi.substr(-8);
        hi = hi.length > 8 ? hi.substr(0, hi.length - 8) : '';
        hi = parseInt(hi, 16);
        lo = parseInt(lo, 16);
      } else {
        throw new Error(hi + ' must be a Number or String');
      }
    }

    // Technically we should throw if hi or lo is outside int32 range here, but
    // it's not worth the effort. Anything past the 32'nd bit is ignored.

    // Copy bytes to buffer
    var b = this.buffer, o = this.offset;
    for (var i = 7; i >= 0; i--) {
      b[o+i] = lo & 0xff;
      lo = i == 4 ? hi : lo >>> 8;
    }

    // Restore sign of passed argument
    if (negate) this._2scomp();
  }
769771
@Override
    public INDArray rand(int[] shape, org.nd4j.linalg.api.rng.Random r) {
        INDArray ret = r.nextDouble(shape);
        return ret;
    }
190852
function U64(hi, lo) {
  if (!(this instanceof U64))
    return new U64(hi, lo);

  this.hi = hi | 0;
  this.lo = lo | 0;
}
757344
public static long encode(int hi, int lo) {
        long h = ((long) hi) & 0xFFFF_FFFFL;
        long l = ((long) lo) & 0xFFFF_FFFFL;
        return (h << 32) + l;
    }
959237
public static int random(final int min, final int max) {
        return min + new java.security.SecureRandom().nextInt(max - min + 1);
    }
524872
public function rand($lower = null, $upper = null)
    {
        if ($lower === null && $upper === null) {
            return $this->source->extractNumber();
        }

        if ($lower > $upper) {
            list($lower, $upper) = [$upper, $lower];
        }
        $delta = $upper - $lower;
        $divisor = ($this->source->max()) / ($delta + 1);

        do {
            $retval = (int) floor($this->source->extractNumber() / $divisor);
        } while ($retval > $delta);

        return $retval + $lower;
    }
847880
public T between(Object low, Object hi) {
        return _withComparisonOperator(ComparisonOperator.BETWEEN)._withValues(low, hi);
    }
843868
public static MutableDoubleTuple createRandom(int size, Random random)
    {
       MutableDoubleTuple t = create(size);
       randomize(t, random);
       return t;
    }
791419
static int getRandomValueFromInterval(
            double randomizationFactor, double random, int currentIntervalMillis) {
        double delta = randomizationFactor * currentIntervalMillis;
        double minInterval = currentIntervalMillis - delta;
        double maxInterval = currentIntervalMillis + delta;
        // Get a random value from the range [minInterval, maxInterval].
        // The formula used below has a +1 because if the minInterval is 1 and the maxInterval is 3 then
        // we want a 33% chance for selecting either 1, 2 or 3.
        int randomValue = (int) (minInterval + (random * (maxInterval - minInterval + 1)));
        return randomValue;
    }
87293
public static long random(long min, long max) {
        return Math.round(ThreadLocalRandom.current().nextDouble()
                * (max - min) + min);
    }
573009
public static List random(Number min, Number max, long lenMin, long lenMax) {
		long len = random(lenMin, lenMax).longValue();
		if (len > 0) {
			List ret = new ArrayList();
			for (int i = 0; i < len; i++) {
				ret.add(random(min, max));
			}
			return ret;
		}
		return null;
	}
1312846
@Override
    public double rand() {
        if (k - Math.floor(k) != 0.0) {
            throw new IllegalArgumentException("Gamma random number generator support only integer shape parameter.");
        }

        double r = 0.0;

        for (int i = 0; i < k; i++) {
            r += Math.log(Math.random());
        }

        r *= -theta;

        return r;
    }