Generate random with uniform distribution in some range

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

how can I generate random number with uniform distribution in some range i.e [a, b] using q?

I have found some solution, but truly speaking I don t know how to rewrite it, because those solution generate random numbers in range (0:1].

uniformRandomVariate : { []
        (1 ? 1f)[0]
    }

Answers

http://q-lang.sourceforge.net/qcalc/qdoc_10.html#SEC67 http://q-lang.sourceforge.net/qcalc/qdoc_10.html#SEC67

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/17212000/generate-random-with-uniform-distribution-in-some-range

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils