j...@bitminer.ca wrote:

> Clarify that drand48 returns values not including 1.0.
> 
> Index: src/lib/libc/stdlib/rand48.3
> ===================================================================
> RCS file: /cvs/src/lib/libc/stdlib/rand48.3,v
> retrieving revision 1.20
> diff -u -r1.20 rand48.3
> --- src/lib/libc/stdlib/rand48.3      10 Nov 2015 23:48:18 -0000      1.20
> +++ src/lib/libc/stdlib/rand48.3      20 Dec 2019 00:08:24 -0000
> @@ -101,7 +101,8 @@
>  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] (which
> +excludes 1.0 and includes 0.0).
>  .Pp
>  .Fn lrand48
>  and

It's a mathematical notation that anyone using this page should
understand because it comes with the territory.  Once you are touching
doubles, soon you'll be looking at functions in libm proper, where this
type of notation is even more common.  Will you then propose to change
all those as well?

I think understanding the landscape's notation is a requirement, and we
don't need to say things a 2nd time in baby talk.

Reply via email to