I couldn’t find it in docs. If
X=rand(), then
X comes from [0 1] or [0 1) or some other variance?
help?> rand
search: rand randn rand! randn! randexp randperm randjump randexp! randcycle randsubseq randstring randsubseq! RandomDevice srand sprand sprandn bitrand transcode readandwrite RangeIndex macroexpand @macroexpand rsearchindex
rand([rng=GLOBAL_RNG], [S], [dims...])
Pick a random element or array of random elements from the set of values specified by S; S can be
• an indexable collection (for example 1:n or ['x','y','z']), or
• a type: the set of values to pick from is then equivalent to typemin(S):typemax(S) for integers (this is not applicable to BigInt), and to [0, 1) for floating point numbers;
S defaults to Float64.
Note: “to [0, 1)
for floating point numbers”
3 Likes