[TUHS] Origins of drand48()?

M. Warner Losh imp at bsdimp.com
Thu Apr 1 12:23:31 AEST 2010

In message: <20100401020155.GG18965 at bitmover.com>
            Larry McVoy <lm at bitmover.com> writes:
: I suspect it is really ATT source.  There is a lot more of that around
: than people admit.

Yea.  Lots of snippets make their way into all kinds of different
systems.  Linux and BSD, although much of what's in the latter was
been blessed by USL and has their copyright notice (and permission to

: I also suspect it doesn't matter.  Your points about how it works are
: part of it, but the bigger part is that Unix, at this point, has very
: little IP value.  It's mostly there in Linux et al.

This is also true.  Part of the problem here too is that it isn't
clear that this code is actually copyrighted or not.  This was part of
the AT&T vs BSD case: due to lack of copyright notices, many works
that AT&T thought they had a copyright on they don't.  This is one of
the main reasons why they settled the suit with Berkeley....  Of
course, in this instance, if Warren can't find it in the BSD archives,
then it likely wasn't in 32V...


: --lm
: On Wed, Mar 31, 2010 at 09:23:00PM -0400, John Cowan wrote:
: > Warren Toomey scripsit:
: > 
: > > As far as I can determine, drand48() arrived in SysVR1 and is defined
: > > in the first SVID. It doesn't appear in SysIII, nor in the early BSDs.
: > > Can anybody shed some light on drand48()? Could it have been written
: > > elsewhere and made available e.g on a Usenix tape or comp.sources.*,
: > > and included into SysV, or is SysV the origin of the code?
: > 
: > FWIW, the code appears in OpenSolaris with an AT&T 1988 copyright header.
: > It's been generified and given a CDDL license and Sun Microsystems 2008
: > copyright header.
: > 
: > There are a bunch of other copies floating around *without* an AT&T
: > copyright, e.g.
: > http://cs.nyu.edu/~yap/classes/visual/data/ply/cygwin-version/ply/drand48.c .
: > 
: > > I'm sure the algorithm comes from elsewhere, e.g. Knuth, but the
: > > strong code similarity is a worry.
: > 
: > It's a linear congruential generator with multiplier 25214903917,
: > addend 11, and modulus 2^48, so there's nothing special about that.
: > LCGs are indeed discussed in Knuth volume 2.
: > 
: > -- 
: > John Cowan  cowan at ccil.org    http://ccil.org/~cowan
: > Big as a house, much bigger than a house, it looked to [Sam], a grey-clad
: > moving hill.  Fear and wonder, maybe, enlarged him in the hobbit's eyes,
: > but the Mumak of Harad was indeed a beast of vast bulk, and the like of him
: > does not walk now in Middle-earth; his kin that live still in latter days are
: > but memories of his girth and his majesty.  --"Of Herbs and Stewed Rabbit"
: > _______________________________________________
: > TUHS mailing list
: > TUHS at minnie.tuhs.org
: > https://minnie.tuhs.org/mailman/listinfo/tuhs
: -- 
: ---
: Larry McVoy                lm at bitmover.com           http://www.bitkeeper.com
: _______________________________________________
: TUHS mailing list
: TUHS at minnie.tuhs.org
: https://minnie.tuhs.org/mailman/listinfo/tuhs
TUHS mailing list
TUHS at minnie.tuhs.org

More information about the TUHS mailing list