I guess that clears up the question, then (:-)) Thanks for checking! -- Pete-- On Tue, Jan 18, 2022 at 09:57:48PM +0100, joachim heintz wrote: > well just by trial ... > > instr Test > indx = 1 > while indx < 10000000 do > iRnd = rnd:i(1) > if iRnd > .999999 then > printf_i "rnd(1) = %f in cycle %d.\n", indx, iRnd, indx > endif > indx += 1 > od > endin > schedule("Test",0,0) > > ... i get this: > > rnd(1) = 0.999999 in cycle 4820758. > rnd(1) = 1.000000 in cycle 6319223. > rnd(1) = 0.999999 in cycle 7789384. > rnd(1) = 1.000000 in cycle 9287849. > > in other words: it takes some time, but it is not impossible. > > j > > > > > On 18/01/2022 20:37, Pete Goodeve wrote: > >On Tue, Jan 18, 2022 at 07:44:22PM +0900, Tetsuya Miwa wrote: > >>Hi all, > >> > >>I thought all the random number generators having range parameter in > >>Csound return the number in closed range (a <= N <= b, [a,b]). > >>However, I started to feel less confident about it after checking the > >>manual. > >>For example, the manual says rnd(x) returns a random number in the > >>unipolar range 0 to x. > >>Is it [0,x] or [0,x) (semi-open)? > >> > >Not sure of your notation there, and one of the developers will have > >to give the definitive answer, but as far as I know 'rnd(10)' can include > >the exact output '10', not just "arbitrarily close, but never exactly...". > > > >However, ift is really random, it might be hard to tell! > > > > -- Pete -- > > > >Csound mailing list > >Csound@listserv.heanet.ie > >https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND > >Send bugs reports to > > https://github.com/csound/csound/issues > >Discussions of bugs and features can be posted here > > Csound mailing list > Csound@listserv.heanet.ie > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND > Send bugs reports to > https://github.com/csound/csound/issues > Discussions of bugs and features can be posted here Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here