Re: win32 random number generator

"Merlin Moncure" <[email protected]> Mon, 22 Aug 2005 17:21:54 -0400
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <[email protected]>
>=20
> Anyone care to burrow into the code and see what its problem is?
>=20

got it.

Looks like this in lrand48(void):
//return ((long) _rand48_seed[2] << 15) + ((long) _rand48_seed[1] > 1);

is supposed to be this:
return (long)((unsigned long) _rand48_seed[2] << 15) + ((unsigned long)
_rand48_seed[1] >> 1);

in port\rand.c

Merlin


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [email protected] so that your
       message can get through to the mailing list cleanly