Programming-Idioms

History of Idiom 15

Idiom #15 Pick uniformly a random integer in [a..b]

Pick a random integer greater than or equals to a, inferior or equals to b. Precondition : a < b.

#Edit dateEdit SummaryAuthor
👁 Δ 49 2020-10-11, 00:02 New Obj-C implementation by user [OC] OC
👁 Δ 48 2020-09-28, 19:39 [Elixir] HTTPS DocURL programming-idioms.org
👁 Δ 47 2020-09-28, 19:38 Restored version 45: Dupe of impl 1914 programming-idioms.org
👁 Δ 46 2020-09-28, 19:09 New Elixir implementation by user [shanebdavis] shanebdavis
👁 Δ 45 2020-07-15, 15:52 New Rust implementation by user [Plecra] Plecra
👁 Δ 44 2020-04-29, 09:19 [Clojure] don't put a space before fn dal
👁 Δ 43 2019-10-14, 12:23 [Elixir] Dead link: play.elixirbyexample.com has been down for a while programming-idioms.org
👁 Δ 42 2019-10-14, 12:22 [Elixir] Dead link: play.elixirbyexample.com has been down for a while programming-idioms.org
👁 Δ 41 2019-09-26, 20:34 New Fortran implementation by user [tkoenig] tkoenig
👁 Δ 40 2019-09-26, 17:12 [C] Fix modulo bias, and also allow `b` daniel
👁 Δ 39 2018-05-08, 01:28 New Cpp implementation by user [fantasy] fantasy
👁 Δ 38 2017-03-31, 16:57 Restored version 36 programming-idioms.org
👁 Δ 37 2017-03-31, 14:42 [JS] wqwgeh wyey
👁 Δ 36 2017-03-07, 10:31 [Csharp] using programming-idioms.org
👁 Δ 35 2017-02-07, 21:45 [Elixir] Fixed code. +DemoURL. +DocURL programming-idioms.org
👁 Δ 34 2016-11-30, 22:01 [Elixir] +DocURL programming-idioms.org
👁 Δ 33 2016-11-30, 21:58 New Elixir implementation by user [programming-idioms.org] programming-idioms.org
👁 Δ 32 2016-11-24, 12:59 +keyword programming-idioms.org
👁 Δ 31 2016-04-07, 20:27 [Ruby] rand supports a range as argument
👁 Δ 30 2016-02-18, 16:57 New Csharp implementation by user [zehberk]
👁 Δ 29 2016-02-16, 17:56 New Csharp implementation by user [zehberk]
👁 Δ 28 2016-02-16, 16:14 New Lua implementation by user [jparoz]
👁 Δ 27 2015-12-30, 17:10 [Go] +DemoURL, +DocURL to rand.Intn
👁 Δ 26 2015-11-30, 12:37
👁 Δ 25 2015-10-29, 14:05
👁 Δ 24 2015-09-05, 15:23
👁 Δ 23 2015-09-03, 13:50
👁 Δ 22 2015-09-03, 13:49
👁 Δ 21 2015-09-03, 13:49
👁 Δ 20 2015-09-03, 13:49
👁 Δ 19 2015-09-03, 13:31
👁 Δ 18 2015-09-03, 13:30
👁 Δ 17 2015-09-03, 13:30
👁 Δ 16 2015-09-02, 15:09
👁 Δ 15 2015-09-02, 15:06
👁 Δ 14 2015-09-02, 15:06
👁 Δ 13 2015-09-02, 15:06
👁 Δ 12 2015-09-02, 15:06
👁 Δ 11 2015-09-02, 15:06
👁 Δ 10 2015-09-02, 15:06
👁 Δ 9 2015-08-22, 22:13
👁 Δ 8 2015-08-21, 23:09
👁 Δ 7 2015-08-21, 08:54
👁 Δ 6 2015-08-20, 15:38
👁 Δ 5 2015-08-20, 15:37
👁 Δ 4 2015-08-20, 11:58
👁 Δ 3 2015-07-31, 19:04
👁 Δ 2 2015-05-06, 21:04
1 2015-01-29, 12:34