Created attachment 211671 [details] allow denomitator to be a double again random(6) pre-r355693 supported a double value for denominator. This made it possible to select roughly 99%, say, of the lines in an input file using "random 1.01", or roughly 51% of the lines with "random 1.96". Both these cases are now equivalent to "random 1" and return all lines. The attached patch returns this functionality. Salt to taste. [Patch r356810 resolved another problem with r355693.]
A commit references this bug: Author: cem Date: Sat Feb 15 19:13:38 UTC 2020 New revision: 357975 URL: https://svnweb.freebsd.org/changeset/base/357975 Log: random(6): Re-add undocumented support for floating point denominators And document it in the manual page. PR: 244139 Submitted by: Keith White <kwhite AT site.uottawa.ca> (earlier version) Changes: head/usr.bin/random/random.6 head/usr.bin/random/random.c head/usr.bin/random/randomize_fd.c head/usr.bin/random/randomize_fd.h
Thanks.