Re: win32 random number generator
"Merlin Moncure" <[email protected]> Tue, 23 Aug 2005 08:14:21 -0400
| Newsgroups | gmane.comp.db.postgresql.devel.win32,gmane.comp.db.postgresql.devel.patches |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. ------_=_NextPart_001_01C5A7DC.3193F716 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > "Merlin Moncure" <[email protected]> writes: > > Looks like this in lrand48(void): _rand48_seed[1] > 1); =20 > > _rand48_seed[1] >> 1); ^^ The problem is the shift operator :). Anyways I double checked the results and it works as expected now so here's a patch. I also removed the spurious casts. Merlin ------_=_NextPart_001_01C5A7DC.3193F716 Content-Type: application/octet-stream; name="fix_random.diff" Content-Transfer-Encoding: base64 Content-Description: fix_random.diff Content-Disposition: attachment; filename="fix_random.diff" SW5kZXg6IC4vc3JjL3BvcnQvcmFuZC5jDQo9PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09DQpSQ1MgZmlsZTogL3Byb2plY3RzL2N2c3Jvb3QvcGdzcWwvc3JjL3Bv cnQvcmFuZC5jLHYNCnJldHJpZXZpbmcgcmV2aXNpb24gMS4zDQpkaWZmIC1y MS4zIHJhbmQuYw0KNjZjNjYNCjwgCXJldHVybiAoKGxvbmcpIF9yYW5kNDhf c2VlZFsyXSA8PCAxNSkgKyAoKGxvbmcpIF9yYW5kNDhfc2VlZFsxXSA+IDEp Ow0KLS0tDQo+IAlyZXR1cm4gKChsb25nKSBfcmFuZDQ4X3NlZWRbMl0gPDwg MTUpICsgKChsb25nKSBfcmFuZDQ4X3NlZWRbMV0gPj4gMSk7DQo= ------_=_NextPart_001_01C5A7DC.3193F716 Content-Type: text/plain Content-Disposition: inline MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match ------_=_NextPart_001_01C5A7DC.3193F716--