docs for random function
docs for random function
От:
Sam Mason <sam@samason.me.uk>
Дата:
Hi, The docs for the function random() currently say: random value between 0.0 and 1.0, inclusive this isn't a particularly useful invariant, what the code actually does (and is commented as doing) is much more useful. Any chance of changing it to something like: --- doc/src/sgml/func.sgml~ 2009-06-17 22:58:49.000000000 +0100 +++ doc/src/sgml/func.sgml 2009-08-16 13:28:18.814767110 +0100 @@ -821,7 +821,7 @@ random() dp - random value between 0.0 and 1.0, inclusive + random value in the range [0.0 - 1.0) random() or maybe something more readable to non-maths people? -- Sam http://samason.me.uk/
Re: docs for random function
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Sam Mason writes: > The docs for the function random() currently say: > random value between 0.0 and 1.0, inclusive > this isn't a particularly useful invariant, what the code actually does > (and is commented as doing) is much more useful. Any chance of changing > it to something like: Yeah, it looks like Bruce changed this back in 8.2 and failed to fix the documentation to match. I used this wording instead: *************** *** 821,827 **** random() dp ! random value between 0.0 and 1.0, inclusive random() --- 821,827 ---- random() dp ! random value in the range 0.0 <= x < 1.0 random() regards, tom lane
Re: docs for random function
От:
Sam Mason <sam@samason.me.uk>
Дата:
On Sun, Aug 16, 2009 at 03:57:23PM -0400, Tom Lane wrote: > Sam Mason writes: > > The docs for the function random() currently say: > > random value between 0.0 and 1.0, inclusive > > Yeah, it looks like Bruce changed this back in 8.2 and failed to fix > the documentation to match. I used this wording instead: > > ! random value in the range 0.0 <= x < 1.0 Cool, that should be easier on people. -- Sam http://samason.me.uk/