On Thu, Dec 19, 2019 at 10:05 PM Theo de Raadt <dera...@openbsd.org> wrote: > It's a mathematical notation that anyone using this page should > understand because it comes with the territory. > [snip] > > I think understanding the landscape's notation is a requirement, and we > don't need to say things a 2nd time in baby talk. I agree it doesn't need to be repeated, but I think there's value in explicitly showing whether an interval is open or closed. Though, in this case, the interval would be correctly expressed as [0.0, 1.0) or [0.0, 1.0[ rather than how j's diff does it.
I attached a diff which I feel concisely does this. I elected to not change the latter two of the three intervals in the man page, since they already included -1 in their upper bound. But I also have that as an option, via largediff.txt
Index: rand48.3 =================================================================== RCS file: /cvs/src/lib/libc/stdlib/rand48.3,v retrieving revision 1.20 diff -u -p -r1.20 rand48.3 --- rand48.3 10 Nov 2015 23:48:18 -0000 1.20 +++ rand48.3 20 Dec 2019 03:43:34 -0000 @@ -101,7 +101,7 @@ and return values of type double. The full 48 bits of r(n+1) are loaded into the mantissa of the returned value, with the exponent set -such that the values produced lie in the interval [0.0, 1.0]. +such that the values produced lie in the interval [0.0, 1.0). .Pp .Fn lrand48 and
Index: rand48.3 =================================================================== RCS file: /cvs/src/lib/libc/stdlib/rand48.3,v retrieving revision 1.20 diff -u -p -r1.20 rand48.3 --- rand48.3 10 Nov 2015 23:48:18 -0000 1.20 +++ rand48.3 20 Dec 2019 03:46:09 -0000 @@ -101,13 +101,13 @@ and return values of type double. The full 48 bits of r(n+1) are loaded into the mantissa of the returned value, with the exponent set -such that the values produced lie in the interval [0.0, 1.0]. +such that the values produced lie in the interval [0.0, 1.0). .Pp .Fn lrand48 and .Fn nrand48 return values of type long in the range -[0, 2**31-1]. +[0, 2**31). The high-order (31) bits of r(n+1) are loaded into the lower bits of the returned value, with the topmost (sign) bit set to zero. @@ -116,7 +116,7 @@ the topmost (sign) bit set to zero. and .Fn jrand48 return values of type long in the range -[-2**31, 2**31-1]. +[-2**31, 2**31). The high-order (32) bits of r(n+1) are loaded into the returned value. .Pp In the deterministic mode, the